From ffa41856a7c8e71884dabd32c516b23545706392 Mon Sep 17 00:00:00 2001 From: BEANSS0328 Date: Sat, 23 Mar 2024 12:35:16 -0400 Subject: [PATCH] Kirby's worse nightmare --- fighters/metaknight/src/acmd/aerials.rs | 280 +++++----- fighters/metaknight/src/acmd/ground.rs | 142 +++-- fighters/metaknight/src/acmd/mod.rs | 16 +- fighters/metaknight/src/acmd/other.rs | 44 +- fighters/metaknight/src/acmd/smashes.rs | 164 +++--- fighters/metaknight/src/acmd/specials.rs | 516 +++++++++---------- fighters/metaknight/src/acmd/throws.rs | 188 ++++--- fighters/metaknight/src/acmd/tilts.rs | 184 ++++--- fighters/metaknight/src/lib.rs | 8 +- fighters/metaknight/src/opff.rs | 6 +- fighters/metaknight/src/status/attack_100.rs | 6 +- fighters/metaknight/src/status/mod.rs | 6 +- fighters/metaknight/src/status/special_s.rs | 6 +- 13 files changed, 774 insertions(+), 792 deletions(-) diff --git a/fighters/metaknight/src/acmd/aerials.rs b/fighters/metaknight/src/acmd/aerials.rs index b655b6ff69..630923c803 100644 --- a/fighters/metaknight/src/acmd/aerials.rs +++ b/fighters/metaknight/src/acmd/aerials.rs @@ -1,40 +1,40 @@ 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 +54,237 @@ 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..b62c89e0ad 100644 --- a/fighters/metaknight/src/acmd/ground.rs +++ b/fighters/metaknight/src/acmd/ground.rs @@ -1,116 +1,116 @@ 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) { + if is_excute(agent) { //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); + 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(fighter, 0, 4); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 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)); } @@ -154,12 +154,12 @@ unsafe extern "C" fn effect_attack100(fighter: &mut L2CAgentBase) { // } // } -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")), @@ -168,37 +168,35 @@ unsafe extern "C" fn sound_attack100start(fighter: &mut L2CAgentBase) { } } -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..095a2343a6 100644 --- a/fighters/metaknight/src/acmd/mod.rs +++ b/fighters/metaknight/src/acmd/mod.rs @@ -7,12 +7,12 @@ mod specials; mod throws; mod ground; -pub fn install() { - aerials::install(); - tilts::install(); - other::install(); - smashes::install(); - specials::install(); - throws::install(); - ground::install(); +pub fn install(agent: &mut Agent) { + aerials::install(agent); + tilts::install(agent); + other::install(agent); + smashes::install(agent); + specials::install(agent); + throws::install(agent); + ground::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..3dd6546cf2 100644 --- a/fighters/metaknight/src/acmd/other.rs +++ b/fighters/metaknight/src/acmd/other.rs @@ -1,7 +1,7 @@ use super::*; -unsafe extern "C" fn damageflyhi_sound(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damageflyhi(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); frame(lua_state, 1.0); @@ -26,7 +26,7 @@ unsafe extern "C" fn damageflyhi_sound(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn damageflylw_sound(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damageflylw(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); frame(lua_state, 1.0); @@ -51,7 +51,7 @@ unsafe extern "C" fn damageflylw_sound(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn damageflyn_sound(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damageflyn(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); frame(lua_state, 1.0); @@ -76,7 +76,7 @@ unsafe extern "C" fn damageflyn_sound(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn damageflyroll_sound(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damageflyroll(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); frame(lua_state, 1.0); @@ -91,7 +91,7 @@ unsafe extern "C" fn damageflyroll_sound(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn sound_damageflytop(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); frame(lua_state, 1.0); @@ -116,7 +116,7 @@ unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn game_dash(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); frame(lua_state, 14.0); @@ -126,7 +126,7 @@ unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) { } -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn sound_dash(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); frame(lua_state, 4.0); @@ -144,7 +144,7 @@ unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn turn_dash_game(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn game_turndash(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); frame(lua_state, 3.0); @@ -158,7 +158,7 @@ unsafe extern "C" fn turn_dash_game(fighter: &mut L2CAgentBase) { } -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn game_escapeair(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")); @@ -173,7 +173,7 @@ unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn game_escapeairslide(fighter: &mut L2CAgentBase) { let lua_state = fighter.lua_state_agent; let boma = fighter.boma(); @@ -187,17 +187,15 @@ unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { } } -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_damageflyhi); + agent.acmd("sound_damageflylw", sound_damageflylw); + agent.acmd("sound_damageflyn", sound_damageflyn); + agent.acmd("sound_damageflyroll", sound_damageflyroll); + agent.acmd("sound_damageflytop", sound_damageflytop); + 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..96f21a3693 100644 --- a/fighters/metaknight/src/acmd/smashes.rs +++ b/fighters/metaknight/src/acmd/smashes.rs @@ -1,170 +1,168 @@ 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..a7ce4a04a3 100644 --- a/fighters/metaknight/src/acmd/specials.rs +++ b/fighters/metaknight/src/acmd/specials.rs @@ -1,126 +1,126 @@ 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 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_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 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(agent.module_accessor); + PostureModule::update_rot_y_lr(agent.module_accessor); } - 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 +129,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(agent.module_accessor, *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,7 +138,7 @@ 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 @@ -147,56 +147,56 @@ unsafe extern "C" fn metaknight_special_hi_game(fighter: &mut L2CAgentBase) { } -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(agent.module_accessor); + PostureModule::update_rot_y_lr(agent.module_accessor); } - 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 +205,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(agent.module_accessor, *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 +214,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 +222,324 @@ 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) { +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(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); + 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(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); MotionModule::set_rate(boma, 2.0); } } -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) { +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(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); + 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(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), false); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), false); } } -unsafe extern "C" fn metaknight_special_s_drill_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +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(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); + 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(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); + 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(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); + 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(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); + 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(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); + 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(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); + 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); } } -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(); +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); + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("game_specialhiloop", game_specialhiloop); + agent.acmd("effect_specialhiloop", effect_specialhiloop); + agent.acmd("effect_specialhi", effect_specialhi); + 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); + agent.acmd("game_specialairsfinish", game_specialairsfinish); + agent.acmd("game_specialsend", game_specialairsfinish); + agent.acmd("game_specialsdrill", game_specialsdrill); + agent.acmd("effect_specialsdrill", effect_specialsdrill); } \ No newline at end of file diff --git a/fighters/metaknight/src/acmd/throws.rs b/fighters/metaknight/src/acmd/throws.rs index a46e019074..13eda22739 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..2771991e80 100644 --- a/fighters/metaknight/src/acmd/tilts.rs +++ b/fighters/metaknight/src/acmd/tilts.rs @@ -1,184 +1,182 @@ 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 metaknight_attack_s3_s_game(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 metaknight_attack_s3_s2_game(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + KineticModule::clear_speed_energy_id(agent.module_accessor, *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 metaknight_attack_s3_s3_game(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 metaknight_attack_hi3_game(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 metaknight_attack_hi3_expression(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 metaknight_attack_lw3_game(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", metaknight_attack_s3_s_game); + agent.acmd("effect_attacks3", effect_attacks3); + agent.acmd("game_attacks3s2", metaknight_attack_s3_s2_game); + agent.acmd("game_attacks3s3", metaknight_attack_s3_s3_game); + agent.acmd("game_attackhi3", metaknight_attack_hi3_game); + agent.acmd("expression_attackhi3", metaknight_attack_hi3_expression); + agent.acmd("game_attacklw3", metaknight_attack_lw3_game); + agent.acmd("effect_attacklw3", effect_attacklw3); } diff --git a/fighters/metaknight/src/lib.rs b/fighters/metaknight/src/lib.rs index 5537dac979..186272bdb3 100644 --- a/fighters/metaknight/src/lib.rs +++ b/fighters/metaknight/src/lib.rs @@ -39,7 +39,9 @@ use utils::{ use smashline::*; pub fn install() { - acmd::install(); - status::install(); - opff::install(); + let agent = &mut Agent::new("metaknight"); + acmd::install(agent); + status::install(agent); + opff::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..4148048250 100644 --- a/fighters/metaknight/src/opff.rs +++ b/fighters/metaknight/src/opff.rs @@ -183,8 +183,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..34ba3cb65d 100644 --- a/fighters/metaknight/src/status/attack_100.rs +++ b/fighters/metaknight/src/status/attack_100.rs @@ -86,8 +86,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, metaknight_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..dc3f430310 100644 --- a/fighters/metaknight/src/status/mod.rs +++ b/fighters/metaknight/src/status/mod.rs @@ -3,7 +3,7 @@ use super::*; 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..f872d7ebfe 100644 --- a/fighters/metaknight/src/status/special_s.rs +++ b/fighters/metaknight/src/status/special_s.rs @@ -15,8 +15,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