From 2dff392c2826e1dd30cbbd8e2ca3158f13bf379f Mon Sep 17 00:00:00 2001 From: BEANSS0328 Date: Sat, 23 Mar 2024 01:43:39 -0400 Subject: [PATCH] Satan herself --- fighters/murabito/src/acmd/smashes.rs | 202 ++++----- fighters/reflet/src/acmd/aerials.rs | 426 +++++++++---------- fighters/reflet/src/acmd/ground.rs | 184 ++++---- fighters/reflet/src/acmd/mod.rs | 16 +- fighters/reflet/src/acmd/other.rs | 273 ++++-------- fighters/reflet/src/acmd/smashes.rs | 102 +++-- fighters/reflet/src/acmd/specials.rs | 90 ++-- fighters/reflet/src/acmd/throws.rs | 112 +++-- fighters/reflet/src/acmd/tilts.rs | 162 ++++--- fighters/reflet/src/elwind/acmd.rs | 7 + fighters/reflet/src/elwind/acmd/special.rs | 30 ++ fighters/reflet/src/elwind/mod.rs | 9 + fighters/reflet/src/gigafire/acmd.rs | 7 + fighters/reflet/src/gigafire/acmd/special.rs | 41 ++ fighters/reflet/src/gigafire/mod.rs | 9 + fighters/reflet/src/lib.rs | 10 +- fighters/reflet/src/opff.rs | 7 +- fighters/reflet/src/status.rs | 10 +- fighters/reflet/src/status/attack_air.rs | 10 +- fighters/reflet/src/status/float.rs | 10 +- fighters/reflet/src/status/special_n.rs | 6 +- fighters/reflet/src/thunder/acmd.rs | 7 + fighters/reflet/src/thunder/acmd/special.rs | 54 +++ fighters/reflet/src/thunder/mod.rs | 9 + 24 files changed, 906 insertions(+), 887 deletions(-) create mode 100644 fighters/reflet/src/elwind/acmd.rs create mode 100644 fighters/reflet/src/elwind/acmd/special.rs create mode 100644 fighters/reflet/src/elwind/mod.rs create mode 100644 fighters/reflet/src/gigafire/acmd.rs create mode 100644 fighters/reflet/src/gigafire/acmd/special.rs create mode 100644 fighters/reflet/src/gigafire/mod.rs create mode 100644 fighters/reflet/src/thunder/acmd.rs create mode 100644 fighters/reflet/src/thunder/acmd/special.rs create mode 100644 fighters/reflet/src/thunder/mod.rs diff --git a/fighters/murabito/src/acmd/smashes.rs b/fighters/murabito/src/acmd/smashes.rs index 611ce3fe8a..8d406333a1 100644 --- a/fighters/murabito/src/acmd/smashes.rs +++ b/fighters/murabito/src/acmd/smashes.rs @@ -1,101 +1,101 @@ use super::*; -unsafe extern "C" fn murabito_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article_enable(boma, *FIGHTER_MURABITO_GENERATE_ARTICLE_BOWLING_BALL, false, 0); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 20.0); - FT_MOTION_RATE_RANGE(fighter, 20.0, 60.0, 29.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 20.0, 60.0, 29.0); + if is_excute(agent) { ArticleModule::shoot(boma, *FIGHTER_MURABITO_GENERATE_ARTICLE_BOWLING_BALL, ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); } frame(lua_state, 60.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn murabito_bowlingball__game_fall(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_fall(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 45, 95, 0, 70, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.15, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 11, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 45, 95, 0, 70, 6.0, 0.0, 0.0, 0.0, None, None, None, 1.15, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 11, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } frame(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 17.0, 45, 95, 0, 70, 3.7, 0.0, 0.0, 0.0, None, None, None, 1.15, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 11, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 17.0, 45, 95, 0, 70, 3.7, 0.0, 0.0, 0.0, None, None, None, 1.15, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 11, 0.0, 0, true, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } } -unsafe extern "C" fn murabito_attack_hi4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_MURABITO_GENERATE_ARTICLE_FIREWORK, false, 0); } frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 12.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 75, 100, 120, 0, 4.0, 0.0, 5.0, -3.5, Some(0.0), Some(5.0), Some(-0.5), 0.5, 0.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 110, 100, 120, 0, 6.0, 0.0, 5.0, 6.0, None, None, None, 0.5, 0.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 75, 100, 120, 0, 4.0, 0.0, 5.0, -3.5, Some(0.0), Some(5.0), Some(-0.5), 0.5, 0.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 110, 100, 120, 0, 6.0, 0.0, 5.0, 6.0, None, None, None, 0.5, 0.1, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } wait(lua_state, 1.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::shoot(boma, *FIGHTER_MURABITO_GENERATE_ARTICLE_FIREWORK, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL), false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn murabito_firework_shoot_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_shoot(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.5, 110, 30, 0, 55, 3.5, -3.0, 20.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, true, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 1, 0, Hash40::new("top"), 1.5, 110, 30, 0, 55, 3.5, 4.0, 20.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, true, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 2, 0, Hash40::new("top"), 1.5, 185, 30, 0, 40, 3.5, -3.0, 27.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, true, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); - ATTACK(fighter, 3, 0, Hash40::new("top"), 1.5, 185, 30, 0, 40, 3.5, 4.0, 27.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, true, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.5, 110, 30, 0, 55, 3.5, -3.0, 20.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, true, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 1, 0, Hash40::new("top"), 1.5, 110, 30, 0, 55, 3.5, 4.0, 20.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, true, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 2, 0, Hash40::new("top"), 1.5, 185, 30, 0, 40, 3.5, -3.0, 27.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, true, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 3, 0, Hash40::new("top"), 1.5, 185, 30, 0, 40, 3.5, 4.0, 27.0, 0.0, None, None, None, 1.0, 0.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 3, true, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); AttackModule::set_no_damage_fly_smoke_all(boma, true, false); } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); - ATTACK(fighter, 0, 0, Hash40::new("top"), 4.6, 90, 220, 0, 30, 10.0, 0.5, 24.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, true, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); + ATTACK(agent, 0, 0, Hash40::new("top"), 4.6, 90, 220, 0, 30, 10.0, 0.5, 24.0, 0.0, None, None, None, 1.5, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, true, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_BOMB); } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 30.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x199c462b5d)); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x199c462b5d)); } } -unsafe extern "C" fn murabito_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { VarModule::off_flag(boma.object(), vars::murabito::instance::IS_TILT_LW_SAPLING_PULL); VarModule::set_float(boma.object(), vars::murabito::instance::SAPLING_PULL_SAPLING_POS_X, 0.0); VarModule::set_float(boma.object(), vars::murabito::instance::SAPLING_PULL_SAPLING_POS_Y, 0.0); @@ -118,7 +118,7 @@ unsafe extern "C" fn murabito_attack_lw4_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { // If the flag is set, use special hitboxes if VarModule::is_flag(boma.object(), vars::murabito::instance::IS_TILT_LW_SAPLING_PULL) { ArticleModule::remove(boma, *FIGHTER_MURABITO_GENERATE_ARTICLE_SPROUT, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); @@ -126,18 +126,18 @@ unsafe extern "C" fn murabito_attack_lw4_game(fighter: &mut L2CAgentBase) { let pos_x = PostureModule::lr(boma) * (VarModule::get_float(boma.object(), vars::murabito::instance::SAPLING_PULL_SAPLING_POS_X) - char_pos.x); let pos_y = VarModule::get_float(boma.object(), vars::murabito::instance::SAPLING_PULL_SAPLING_POS_Y) - char_pos.y; let pos_z = VarModule::get_float(boma.object(), vars::murabito::instance::SAPLING_PULL_SAPLING_POS_Z) - char_pos.z; - ATTACK(fighter, 0, 0, Hash40::new("top"), 20.0, 90, 82, 0, 55, 5.5, pos_z, pos_y + 3.5, pos_x - 5.0, Some(pos_z), Some(pos_y + 3.5), Some(pos_x + 5.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 20.0, 90, 82, 0, 55, 5.5, pos_z, pos_y + 3.5, pos_x - 5.0, Some(pos_z), Some(pos_y + 3.5), Some(pos_x + 5.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); } else { - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 40, 98, 0, 40, 6.0, 0.0, 3.0, 13.0, Some(0.0), Some(3.0), Some(9.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 40, 98, 0, 40, 6.0, 0.0, 3.0, 13.0, Some(0.0), Some(3.0), Some(9.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { VarModule::off_flag(boma.object(), vars::murabito::instance::IS_TILT_LW_SAPLING_PULL); VarModule::set_float(boma.object(), vars::murabito::instance::SAPLING_PULL_SAPLING_POS_X, 0.0); VarModule::set_float(boma.object(), vars::murabito::instance::SAPLING_PULL_SAPLING_POS_Y, 0.0); @@ -160,7 +160,7 @@ unsafe extern "C" fn murabito_attack_lw4_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { // If the flag is set, use special hitboxes if VarModule::is_flag(boma.object(), vars::murabito::instance::IS_TILT_LW_SAPLING_PULL) { ArticleModule::remove(boma, *FIGHTER_MURABITO_GENERATE_ARTICLE_SPROUT, app::ArticleOperationTarget(*ARTICLE_OPE_TARGET_ALL)); @@ -168,44 +168,44 @@ unsafe extern "C" fn murabito_attack_lw4_game(fighter: &mut L2CAgentBase) { let pos_x = PostureModule::lr(boma) * (VarModule::get_float(boma.object(), vars::murabito::instance::SAPLING_PULL_SAPLING_POS_X) - char_pos.x); let pos_y = VarModule::get_float(boma.object(), vars::murabito::instance::SAPLING_PULL_SAPLING_POS_Y) - char_pos.y; let pos_z = VarModule::get_float(boma.object(), vars::murabito::instance::SAPLING_PULL_SAPLING_POS_Z) - char_pos.z; - ATTACK(fighter, 0, 0, Hash40::new("top"), 20.0, 90, 82, 0, 55, 5.5, pos_z, pos_y + 3.5, pos_x - 5.0, Some(pos_z), Some(pos_y + 3.5), Some(pos_x + 5.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); + ATTACK(agent, 0, 0, Hash40::new("top"), 20.0, 90, 82, 0, 55, 5.5, pos_z, pos_y + 3.5, pos_x - 5.0, Some(pos_z), Some(pos_y + 3.5), Some(pos_x + 5.0), 1.5, 1.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_HEAVY, *ATTACK_REGION_OBJECT); } else { - ATTACK(fighter, 1, 0, Hash40::new("top"), 14.0, 40, 98, 0, 40, 6.0, 0.0, 3.0, -13.0, Some(0.0), Some(3.0), Some(-9.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); + ATTACK(agent, 1, 0, Hash40::new("top"), 14.0, 40, 98, 0, 40, 6.0, 0.0, 3.0, -13.0, Some(0.0), Some(3.0), Some(-9.0), 1.0, 0.0, *ATTACK_SETOFF_KIND_THRU, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_OBJECT); } AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn murabito_attack_lw4_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); - if is_excute(fighter) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("haver"), 0.0, 0.0, 15.0, 0, 0, 0, 1.0, 4, 4, 4, 0, 0, 0, true); + if is_excute(agent) { + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("haver"), 0.0, 0.0, 15.0, 0, 0, 0, 1.0, 4, 4, 4, 0, 0, 0, true); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { // If the flag is set, use different effects if VarModule::is_flag(boma.object(), vars::murabito::instance::IS_TILT_LW_SAPLING_PULL) { let char_pos = *PostureModule::pos(boma); // stage pos of villager let pos_x = PostureModule::lr(boma) * (VarModule::get_float(boma.object(), vars::murabito::instance::SAPLING_PULL_SAPLING_POS_X) - char_pos.x); let pos_y = VarModule::get_float(boma.object(), vars::murabito::instance::SAPLING_PULL_SAPLING_POS_Y) - char_pos.y; let pos_z = VarModule::get_float(boma.object(), vars::murabito::instance::SAPLING_PULL_SAPLING_POS_Z) - char_pos.z; - EFFECT(fighter, Hash40::new("murabito_soil2"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 1.0, 4, 4, 4, 0, 0, 0, false); + EFFECT(agent, Hash40::new("murabito_soil2"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 1.0, 4, 4, 4, 0, 0, 0, false); } else { - EFFECT(fighter, Hash40::new("murabito_soil2"), Hash40::new("top"), 15.0, 0.0, 0.5, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("murabito_soil2"), Hash40::new("top"), 15.0, 0.0, 0.5, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); } } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { // If the flag is set, use different effects if VarModule::is_flag(boma.object(), vars::murabito::instance::IS_TILT_LW_SAPLING_PULL) { // generate pluck effects as pos of sapling @@ -213,35 +213,35 @@ unsafe extern "C" fn murabito_attack_lw4_effect(fighter: &mut L2CAgentBase) { let pos_x = PostureModule::lr(boma) * (VarModule::get_float(boma.object(), vars::murabito::instance::SAPLING_PULL_SAPLING_POS_X) - char_pos.x); let pos_y = VarModule::get_float(boma.object(), vars::murabito::instance::SAPLING_PULL_SAPLING_POS_Y) - char_pos.y; let pos_z = VarModule::get_float(boma.object(), vars::murabito::instance::SAPLING_PULL_SAPLING_POS_Z) - char_pos.z; - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("murabito_grass"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("sys_crown"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 2.0); - EFFECT(fighter, Hash40::new("murabito_putaway_catch"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 0.65); + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("murabito_grass"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_crown"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 2.0); + EFFECT(agent, Hash40::new("murabito_putaway_catch"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 0.65); } else { - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), 15.0, 0.0, 0.0, 0, 0, 0, 0.55, 2, 2, 2, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("murabito_clay"), Hash40::new("top"), 15.0, 0.0, 0.0, 0, 0, 0, 1.0, 2, 2, 2, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), 15.0, 0.0, 0.0, 0, 0, 0, 0.55, 2, 2, 2, 0, 0, 0, false); + EFFECT(agent, Hash40::new("murabito_clay"), Hash40::new("top"), 15.0, 0.0, 0.0, 0, 0, 0, 1.0, 2, 2, 2, 0, 0, 0, false); } } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { // If the flag is set, use different effects if VarModule::is_flag(boma.object(), vars::murabito::instance::IS_TILT_LW_SAPLING_PULL) { let char_pos = *PostureModule::pos(boma); // stage pos of villager let pos_x = PostureModule::lr(boma) * (VarModule::get_float(boma.object(), vars::murabito::instance::SAPLING_PULL_SAPLING_POS_X) - char_pos.x); let pos_y = VarModule::get_float(boma.object(), vars::murabito::instance::SAPLING_PULL_SAPLING_POS_Y) - char_pos.y; let pos_z = VarModule::get_float(boma.object(), vars::murabito::instance::SAPLING_PULL_SAPLING_POS_Z) - char_pos.z; - EFFECT(fighter, Hash40::new("murabito_soil2"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 1.0, 4, 4, 4, 0, 0, 0, false); + EFFECT(agent, Hash40::new("murabito_soil2"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 1.0, 4, 4, 4, 0, 0, 0, false); } else { - EFFECT(fighter, Hash40::new("murabito_soil2"), Hash40::new("top"), -15.0, 0.0, 0.5, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("murabito_soil2"), Hash40::new("top"), -15.0, 0.0, 0.5, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); } } frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { // If the flag is set, use different effects if VarModule::is_flag(boma.object(), vars::murabito::instance::IS_TILT_LW_SAPLING_PULL) { // generate pluck effects as pos of sapling @@ -249,60 +249,60 @@ unsafe extern "C" fn murabito_attack_lw4_effect(fighter: &mut L2CAgentBase) { let pos_x = PostureModule::lr(boma) * (VarModule::get_float(boma.object(), vars::murabito::instance::SAPLING_PULL_SAPLING_POS_X) - char_pos.x); let pos_y = VarModule::get_float(boma.object(), vars::murabito::instance::SAPLING_PULL_SAPLING_POS_Y) - char_pos.y; let pos_z = VarModule::get_float(boma.object(), vars::murabito::instance::SAPLING_PULL_SAPLING_POS_Z) - char_pos.z; - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("murabito_grass"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("sys_crown"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 2.0); - EFFECT(fighter, Hash40::new("murabito_putaway_catch"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); - LAST_EFFECT_SET_RATE(fighter, 0.65); + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 0.7, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("murabito_grass"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, false); + EFFECT(agent, Hash40::new("sys_crown"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 2.0); + EFFECT(agent, Hash40::new("murabito_putaway_catch"), Hash40::new("top"), pos_x, pos_y, pos_z, 0, 0, 0, 0.4, 0, 0, 0, 0, 0, 0, false); + LAST_EFFECT_SET_RATE(agent, 0.65); } else { - LANDING_EFFECT(fighter, Hash40::new("sys_down_smoke"), Hash40::new("top"), -15.0, 0.0, 0.0, 0, 0, 0, 0.55, 2, 2, 2, 0, 0, 0, false); - EFFECT(fighter, Hash40::new("murabito_clay"), Hash40::new("top"), -15.0, 0.0, 0.0, 0, 0, 0, 1.0, 2, 2, 2, 0, 0, 0, false); + LANDING_EFFECT(agent, Hash40::new("sys_down_smoke"), Hash40::new("top"), -15.0, 0.0, 0.0, 0, 0, 0, 0.55, 2, 2, 2, 0, 0, 0, false); + EFFECT(agent, Hash40::new("murabito_clay"), Hash40::new("top"), -15.0, 0.0, 0.0, 0, 0, 0, 1.0, 2, 2, 2, 0, 0, 0, false); } } } -unsafe extern "C" fn murabito_attack_lw4_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 2.0); - if is_excute(fighter) { - STOP_SE(fighter, Hash40::new("se_common_smash_start")); + if is_excute(agent) { + STOP_SE(agent, Hash40::new("se_common_smash_start")); } frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::murabito::instance::IS_TILT_LW_SAPLING_PULL) { - PLAY_SE(fighter, Hash40::new("se_murabito_special_s04")); + PLAY_SE(agent, Hash40::new("se_murabito_special_s04")); } else { - PLAY_SE(fighter, Hash40::new("se_murabito_smash_l02")); + PLAY_SE(agent, Hash40::new("se_murabito_smash_l02")); } } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { if VarModule::is_flag(boma.object(), vars::murabito::instance::IS_TILT_LW_SAPLING_PULL) { - PLAY_SE(fighter, Hash40::new("se_murabito_special_s04")); + PLAY_SE(agent, Hash40::new("se_murabito_special_s04")); } else { - PLAY_SE(fighter, Hash40::new("se_murabito_smash_l02")); + PLAY_SE(agent, Hash40::new("se_murabito_smash_l02")); } } } pub fn install() { smashline::Agent::new("murabito_bowlingball") - .acmd("game_fall", murabito_bowlingball__game_fall) + .acmd("game_fall", game_fall) .install(); smashline::Agent::new("murabito") - .acmd("game_attacks4", murabito_attack_s4_s_game) - .acmd("game_attackhi4", murabito_attack_hi4_game) - .acmd("game_attacklw4", murabito_attack_lw4_game) - .acmd("effect_attacklw4", murabito_attack_lw4_effect) - .acmd("sound_attacklw4", murabito_attack_lw4_sound) + .acmd("game_attacks4", game_attacks4) + .acmd("game_attackhi4", game_attackhi4) + .acmd("game_attacklw4", game_attacklw4) + .acmd("effect_attacklw4", effect_attacklw4) + .acmd("sound_attacklw4", sound_attacklw4) .install(); smashline::Agent::new("murabito_firework") - .acmd("game_shoot", murabito_firework_shoot_game) + .acmd("game_shoot", game_shoot) .install(); } diff --git a/fighters/reflet/src/acmd/aerials.rs b/fighters/reflet/src/acmd/aerials.rs index fc5946acd7..b72155c9b5 100644 --- a/fighters/reflet/src/acmd/aerials.rs +++ b/fighters/reflet/src/acmd/aerials.rs @@ -1,53 +1,53 @@ use super::*; -unsafe extern "C" fn reflet_attack_air_n_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - VarModule::set_int(fighter.battle_object, vars::reflet::instance::LEVIN_AERIAL_LENIENCY, 5); +unsafe extern "C" fn game_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + VarModule::set_int(agent.battle_object, vars::reflet::instance::LEVIN_AERIAL_LENIENCY, 5); } frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.75); + FT_MOTION_RATE(agent, 0.75); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 8.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 13.0, 361, 60, 0, 61, 4.3, 0.0, 7.5, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 13.0, 361, 60, 0, 61, 4.0, 0.0, 1.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 13.0, 361, 60, 0, 61, 3.5, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword"), 13.0, 361, 60, 0, 61, 4.3, 0.0, 7.5, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 13.0, 361, 60, 0, 61, 4.0, 0.0, 1.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 13.0, 361, 60, 0, 61, 3.5, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); } else { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 9.0, 55, 68, 0, 36, 3.5, 0.0, 6.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 9.0, 55, 68, 0, 36, 3.5, 0.0, 0.5, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 9.0, 55, 68, 0, 36, 3.5, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword"), 9.0, 55, 68, 0, 36, 3.5, 0.0, 6.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 9.0, 55, 68, 0, 36, 3.5, 0.0, 0.5, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 9.0, 55, 68, 0, 36, 3.5, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 13.0, 41, 60, 0, 61, 4.3, 0.0, 7.5, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 13.0, 41, 60, 0, 61, 4.0, 0.0, 1.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 13.0, 41, 60, 0, 61, 3.5, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword"), 13.0, 41, 60, 0, 61, 4.3, 0.0, 7.5, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 13.0, 41, 60, 0, 61, 4.0, 0.0, 1.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 13.0, 41, 60, 0, 61, 3.5, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); } else { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 9.0, 45, 73, 0, 36, 3.5, 0.0, 6.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 9.0, 45, 73, 0, 36, 3.5, 0.0, 0.5, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 9.0, 45, 73, 0, 36, 3.5, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword"), 9.0, 45, 73, 0, 36, 3.5, 0.0, 6.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 9.0, 45, 73, 0, 36, 3.5, 0.0, 0.5, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 9.0, 45, 73, 0, 36, 3.5, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } frame(lua_state, 26.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 5.0, 65, 80, 0, 45, 3.0, 0.0, 9.0, 0.0, Some(0.0), Some(2.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword"), 5.0, 65, 80, 0, 45, 3.0, 0.0, 9.0, 0.0, Some(0.0), Some(2.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); AttackModule::clear(boma, 1, false); } else { @@ -55,11 +55,11 @@ unsafe extern "C" fn reflet_attack_air_n_game(fighter: &mut L2CAgentBase) { } } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 34.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::get_int(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_INT_THUNDER_SWORD_CURRENT_POINT) == 0 { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { VisibilityModule::set_int64(boma, Hash40::new("sword").hash as i64, Hash40::new("sword_normal").hash as i64); @@ -71,77 +71,77 @@ unsafe extern "C" fn reflet_attack_air_n_game(fighter: &mut L2CAgentBase) { } -unsafe extern "C" fn reflet_attack_air_n_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_reflet_sword4"), Hash40::new("tex_reflet_sword2"), 5, Hash40::new("sword"), 0.0, 0.0, 0.0, Hash40::new("sword"), 0.0, 10.75, 0.0, true, Hash40::new("reflet_thunderswoed_flare"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); - EFFECT_FOLLOW(fighter, Hash40::new("reflet_thunderswoed"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_reflet_sword4"), Hash40::new("tex_reflet_sword2"), 5, Hash40::new("sword"), 0.0, 0.0, 0.0, Hash40::new("sword"), 0.0, 10.75, 0.0, true, Hash40::new("reflet_thunderswoed_flare"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + EFFECT_FOLLOW(agent, Hash40::new("reflet_thunderswoed"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } else { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_reflet_sword1"), Hash40::new("tex_reflet_sword5"), 5, Hash40::new("sword"), 0.0, 0.4, 0.0, Hash40::new("sword"), 0.0, 8.5, 0.0, true, Hash40::new("reflet_swoed_flare"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_reflet_sword1"), Hash40::new("tex_reflet_sword5"), 5, Hash40::new("sword"), 0.0, 0.4, 0.0, Hash40::new("sword"), 0.0, 8.5, 0.0, true, Hash40::new("reflet_swoed_flare"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); } } frame(lua_state, 12.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 3); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 3); } frame(lua_state, 13.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("reflet_thunderswoed"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("reflet_thunderswoed"), false, false); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_reflet_sword4"), Hash40::new("tex_reflet_sword2"), 5, Hash40::new("sword"), 0.0, 0.0, 0.0, Hash40::new("sword"), 0.0, 10.75, 0.0, true, Hash40::new("reflet_thunderswoed_flare"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); - EFFECT_FOLLOW(fighter, Hash40::new("reflet_thunderswoed"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_reflet_sword4"), Hash40::new("tex_reflet_sword2"), 5, Hash40::new("sword"), 0.0, 0.0, 0.0, Hash40::new("sword"), 0.0, 10.75, 0.0, true, Hash40::new("reflet_thunderswoed_flare"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + EFFECT_FOLLOW(agent, Hash40::new("reflet_thunderswoed"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } else { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_reflet_sword1"), Hash40::new("tex_reflet_sword5"), 6, Hash40::new("sword"), 0.0, 0.4, 0.0, Hash40::new("sword"), 0.0, 8.5, 0.0, true, Hash40::new("reflet_swoed_flare"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_reflet_sword1"), Hash40::new("tex_reflet_sword5"), 6, Hash40::new("sword"), 0.0, 0.4, 0.0, Hash40::new("sword"), 0.0, 8.5, 0.0, true, Hash40::new("reflet_swoed_flare"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); } } frame(lua_state, 26.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 3); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 3); } frame(lua_state, 27.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("reflet_thunderswoed"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("reflet_thunderswoed"), false, false); } } -unsafe extern "C" fn reflet_attack_air_f_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - VarModule::set_int(fighter.battle_object, vars::reflet::instance::LEVIN_AERIAL_LENIENCY, 5); +unsafe extern "C" fn game_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + VarModule::set_int(agent.battle_object, vars::reflet::instance::LEVIN_AERIAL_LENIENCY, 5); } frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 9.0/(12.0)); + FT_MOTION_RATE(agent, 9.0/(12.0)); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 11.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 13.0, 67, 90, 0, 51, 4.3, 0.0, 7.5, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 13.0, 67, 90, 0, 51, 4.0, 0.0, 1.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 13.0, 67, 90, 0, 51, 3.5, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword"), 13.0, 67, 90, 0, 51, 4.3, 0.0, 7.5, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 13.0, 67, 90, 0, 51, 4.0, 0.0, 1.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 13.0, 67, 90, 0, 51, 3.5, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); } else { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 8.5, 67, 86, 0, 51, 3.5, 0.0, 6.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 8.5, 67, 86, 0, 51, 3.5, 0.0, 0.5, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 8.5, 67, 86, 0, 51, 3.5, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword"), 8.5, 67, 86, 0, 51, 3.5, 0.0, 6.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 8.5, 67, 86, 0, 51, 3.5, 0.0, 0.5, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 8.5, 67, 86, 0, 51, 3.5, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 5.0, 72, 80, 0, 45, 3.0, 0.0, 9.0, 0.0, Some(0.0), Some(2.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword"), 5.0, 72, 80, 0, 45, 3.0, 0.0, 9.0, 0.0, Some(0.0), Some(2.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); AttackModule::clear(boma, 1, false); AttackModule::clear(boma, 2, false); } @@ -150,11 +150,11 @@ unsafe extern "C" fn reflet_attack_air_f_game(fighter: &mut L2CAgentBase) { } } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 22.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::get_int(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_INT_THUNDER_SWORD_CURRENT_POINT) == 0 { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { VisibilityModule::set_int64(boma, Hash40::new("sword").hash as i64, Hash40::new("sword_normal").hash as i64); @@ -163,88 +163,88 @@ unsafe extern "C" fn reflet_attack_air_f_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn reflet_attack_air_f_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn expression_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - if is_excute(fighter) { + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword"), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y), AttackDirectionAxis(*ATTACK_DIRECTION_X)); } } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 11.0); app::sv_animcmd::execute(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashl"), 0); + RUMBLE_HIT(agent, Hash40::new("rbkind_slashl"), 0); } else { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } } -unsafe extern "C" fn reflet_attack_air_f_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairf(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_reflet_sword4"), Hash40::new("tex_reflet_sword2"), 7, Hash40::new("sword"), 0.0, 0.0, 0.0, Hash40::new("sword"), 0.0, 10.75, 0.0, true, Hash40::new("null"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); - EFFECT_FOLLOW(fighter, Hash40::new("reflet_thunderswoed"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("reflet_thunderswoed_flare"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_reflet_sword4"), Hash40::new("tex_reflet_sword2"), 7, Hash40::new("sword"), 0.0, 0.0, 0.0, Hash40::new("sword"), 0.0, 10.75, 0.0, true, Hash40::new("null"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + EFFECT_FOLLOW(agent, Hash40::new("reflet_thunderswoed"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("reflet_thunderswoed_flare"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } else{ - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_reflet_sword1"), Hash40::new("tex_reflet_sword5"), 6, Hash40::new("sword"), 0.0, 0.4, 0.0, Hash40::new("sword"), 0.0, 8.5, 0.0, true, Hash40::new("reflet_swoed_flare"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_reflet_sword1"), Hash40::new("tex_reflet_sword5"), 6, Hash40::new("sword"), 0.0, 0.4, 0.0, Hash40::new("sword"), 0.0, 8.5, 0.0, true, Hash40::new("reflet_swoed_flare"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); } } frame(lua_state, 16.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 3); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 3); } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - EFFECT_OFF_KIND(fighter, Hash40::new("reflet_thunderswoed"), false, false); - EFFECT_OFF_KIND(fighter, Hash40::new("reflet_thunderswoed_flare"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("reflet_thunderswoed"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("reflet_thunderswoed_flare"), false, false); } } } -unsafe extern "C" fn reflet_attack_air_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - VarModule::set_int(fighter.battle_object, vars::reflet::instance::LEVIN_AERIAL_LENIENCY, 5); +unsafe extern "C" fn game_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + VarModule::set_int(agent.battle_object, vars::reflet::instance::LEVIN_AERIAL_LENIENCY, 5); } - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 15.0, 361, 98, 0, 36, 4.3, 0.0, 7.5, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 15.0, 361, 98, 0, 36, 4.0, 0.0, 1.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 15.0, 361, 98, 0, 36, 3.5, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword"), 15.0, 361, 98, 0, 36, 4.3, 0.0, 7.5, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 15.0, 361, 98, 0, 36, 4.0, 0.0, 1.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 15.0, 361, 98, 0, 36, 3.5, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); } else { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 11.5, 361, 79, 0, 36, 3.5, 0.0, 6.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 11.5, 361, 79, 0, 36, 3.5, 0.0, 0.5, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 11.5, 361, 79, 0, 36, 3.5, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword"), 11.5, 361, 79, 0, 36, 3.5, 0.0, 6.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 11.5, 361, 79, 0, 36, 3.5, 0.0, 0.5, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 11.5, 361, 79, 0, 36, 3.5, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 5.0, 65, 80, 0, 45, 3.0, 0.0, 9.0, 0.0, Some(0.0), Some(2.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword"), 5.0, 65, 80, 0, 45, 3.0, 0.0, 9.0, 0.0, Some(0.0), Some(2.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); AttackModule::clear(boma, 1, false); AttackModule::clear(boma, 2, false); } @@ -253,11 +253,11 @@ unsafe extern "C" fn reflet_attack_air_b_game(fighter: &mut L2CAgentBase) { } } wait(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::get_int(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_INT_THUNDER_SWORD_CURRENT_POINT) == 0 { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { VisibilityModule::set_int64(boma, Hash40::new("sword").hash as i64, Hash40::new("sword_normal").hash as i64); @@ -266,71 +266,71 @@ unsafe extern "C" fn reflet_attack_air_b_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn reflet_attack_air_b_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_reflet_sword4"), Hash40::new("tex_reflet_sword2"), 6, Hash40::new("sword"), 0.0, 0.0, 0.0, Hash40::new("sword"), 0.0, 10.75, 0.0, true, Hash40::new("null"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); - EFFECT_FOLLOW(fighter, Hash40::new("reflet_thunderswoed"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1.2, true); - EFFECT_FOLLOW(fighter, Hash40::new("reflet_thunderswoed_flare"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_reflet_sword4"), Hash40::new("tex_reflet_sword2"), 6, Hash40::new("sword"), 0.0, 0.0, 0.0, Hash40::new("sword"), 0.0, 10.75, 0.0, true, Hash40::new("null"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + EFFECT_FOLLOW(agent, Hash40::new("reflet_thunderswoed"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1.2, true); + EFFECT_FOLLOW(agent, Hash40::new("reflet_thunderswoed_flare"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } else{ - EFFECT_FOLLOW(fighter, Hash40::new("sys_smash_flash"), Hash40::new("sword"), 0, 7.0, 0, 0, 0, 0, 0.5, true); - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_reflet_sword1"), Hash40::new("tex_reflet_sword5"), 4, Hash40::new("sword"), 0.0, 0.4, 0.0, Hash40::new("sword"), 0.0, 8.5, 0.0, true, Hash40::new("reflet_swoed_flare"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + EFFECT_FOLLOW(agent, Hash40::new("sys_smash_flash"), Hash40::new("sword"), 0, 7.0, 0, 0, 0, 0, 0.5, true); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_reflet_sword1"), Hash40::new("tex_reflet_sword5"), 4, Hash40::new("sword"), 0.0, 0.4, 0.0, Hash40::new("sword"), 0.0, 8.5, 0.0, true, Hash40::new("reflet_swoed_flare"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); } } frame(lua_state, 13.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 4); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 4); } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - EFFECT_OFF_KIND(fighter, Hash40::new("reflet_thunderswoed"), false, false); - EFFECT_OFF_KIND(fighter, Hash40::new("reflet_thunderswoed_flare"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("reflet_thunderswoed"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("reflet_thunderswoed_flare"), false, false); } } } -unsafe extern "C" fn reflet_attack_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - VarModule::set_int(fighter.battle_object, vars::reflet::instance::LEVIN_AERIAL_LENIENCY, 5); +unsafe extern "C" fn game_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + VarModule::set_int(agent.battle_object, vars::reflet::instance::LEVIN_AERIAL_LENIENCY, 5); } frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.5); + FT_MOTION_RATE(agent, 0.5); frame(lua_state, 5.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 10.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 14.0, 80, 91, 0, 50, 4.3, 0.0, 7.5, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 14.0, 80, 91, 0, 50, 4.0, 0.0, 1.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 14.0, 80, 91, 0, 50, 3.5, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword"), 14.0, 80, 91, 0, 50, 4.3, 0.0, 7.5, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 14.0, 80, 91, 0, 50, 4.0, 0.0, 1.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 14.0, 80, 91, 0, 50, 3.5, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); } else { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 10.0, 80, 75, 0, 51, 3.5, 0.0, 6.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 10.0, 80, 75, 0, 51, 3.5, 0.0, 0.5, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 10.0, 80, 75, 0, 51, 3.5, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword"), 10.0, 80, 75, 0, 51, 3.5, 0.0, 6.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 10.0, 80, 75, 0, 51, 3.5, 0.0, 0.5, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 10.0, 80, 75, 0, 51, 3.5, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } wait(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 5.0, 65, 80, 0, 45, 3.0, 0.0, 9.0, 0.0, Some(0.0), Some(2.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword"), 5.0, 65, 80, 0, 45, 3.0, 0.0, 9.0, 0.0, Some(0.0), Some(2.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); AttackModule::clear(boma, 1, false); AttackModule::clear(boma, 2, false); } @@ -339,16 +339,16 @@ unsafe extern "C" fn reflet_attack_air_hi_game(fighter: &mut L2CAgentBase) { } } wait(lua_state, 7.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { AttackModule::clear_all(boma); } } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::get_int(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_INT_THUNDER_SWORD_CURRENT_POINT) == 0 { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { VisibilityModule::set_int64(boma, Hash40::new("sword").hash as i64, Hash40::new("sword_normal").hash as i64); @@ -358,89 +358,89 @@ unsafe extern "C" fn reflet_attack_air_hi_game(fighter: &mut L2CAgentBase) { } } -unsafe extern "C" fn reflet_attack_air_hi_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_reflet_sword4"), Hash40::new("tex_reflet_sword2"), 6, Hash40::new("sword"), 0.0, 0.0, 0.0, Hash40::new("sword"), 0.0, 10.75, 0.0, true, Hash40::new("null"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); - EFFECT_FOLLOW(fighter, Hash40::new("reflet_thunderswoed"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("reflet_thunderswoed_flare"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_reflet_sword4"), Hash40::new("tex_reflet_sword2"), 6, Hash40::new("sword"), 0.0, 0.0, 0.0, Hash40::new("sword"), 0.0, 10.75, 0.0, true, Hash40::new("null"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + EFFECT_FOLLOW(agent, Hash40::new("reflet_thunderswoed"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("reflet_thunderswoed_flare"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } else { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_reflet_sword1"), Hash40::new("tex_reflet_sword5"), 4, Hash40::new("sword"), 0.0, 0.4, 0.0, Hash40::new("sword"), 0.0, 8.5, 0.0, true, Hash40::new("reflet_swoed_flare"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_reflet_sword1"), Hash40::new("tex_reflet_sword5"), 4, Hash40::new("sword"), 0.0, 0.4, 0.0, Hash40::new("sword"), 0.0, 8.5, 0.0, true, Hash40::new("reflet_swoed_flare"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); } } frame(lua_state, 13.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 4); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 4); } frame(lua_state, 24.0); if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - EFFECT_OFF_KIND(fighter, Hash40::new("reflet_thunderswoed"), false, false); - EFFECT_OFF_KIND(fighter, Hash40::new("reflet_thunderswoed_flare"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("reflet_thunderswoed"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("reflet_thunderswoed_flare"), false, false); } } -unsafe extern "C" fn reflet_attack_air_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - VarModule::set_int(fighter.battle_object, vars::reflet::instance::LEVIN_AERIAL_LENIENCY, 5); +unsafe extern "C" fn game_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + VarModule::set_int(agent.battle_object, vars::reflet::instance::LEVIN_AERIAL_LENIENCY, 5); } frame(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { //Air-Only Hitboxes - ATTACK(fighter, 0, 0, Hash40::new("sword"), 14.0, 270, 54, 0, 22, 4.3, 0.0, 7.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 14.0, 270, 54, 0, 22, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 14.0, 270, 54, 0, 22, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword"), 14.0, 270, 54, 0, 22, 4.3, 0.0, 7.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 14.0, 270, 54, 0, 22, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 14.0, 270, 54, 0, 22, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); //Ground-Only Hitboxes - ATTACK(fighter, 3, 0, Hash40::new("sword"), 14.0, 70, 81, 0, 24, 4.3, 0.0, 7.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 4, 0, Hash40::new("sword"), 14.0, 70, 81, 0, 24, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 5, 0, Hash40::new("armr"), 14.0, 70, 81, 0, 24, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("sword"), 14.0, 70, 81, 0, 24, 4.3, 0.0, 7.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 4, 0, Hash40::new("sword"), 14.0, 70, 81, 0, 24, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 5, 0, Hash40::new("armr"), 14.0, 70, 81, 0, 24, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); } else { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 10.2, 361, 61, 0, 58, 3.5, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 10.2, 361, 61, 0, 58, 3.5, 0.0, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 10.2, 361, 61, 0, 58, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword"), 10.2, 361, 61, 0, 58, 3.5, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 10.2, 361, 61, 0, 58, 3.5, 0.0, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 10.2, 361, 61, 0, 58, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 15.0, 40, 66, 0, 57, 4.3, 0.0, 7.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 15.0, 40, 66, 0, 57, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 15.0, 40, 66, 0, 57, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword"), 15.0, 40, 66, 0, 57, 4.3, 0.0, 7.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 15.0, 40, 66, 0, 57, 4.0, 0.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 15.0, 40, 66, 0, 57, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_A, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); AttackModule::clear(boma, 3, false); AttackModule::clear(boma, 4, false); AttackModule::clear(boma, 5, false); } else { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 9.0, 361, 58, 0, 49, 3.5, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 9.0, 361, 58, 0, 49, 3.5, 0.0, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 9.0, 361, 58, 0, 49, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword"), 9.0, 361, 58, 0, 49, 3.5, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 9.0, 361, 58, 0, 49, 3.5, 0.0, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 9.0, 361, 58, 0, 49, 3.5, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 5.0, 65, 80, 0, 45, 3.0, 0.0, 9.0, 0.0, Some(0.0), Some(2.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword"), 5.0, 65, 80, 0, 45, 3.0, 0.0, 9.0, 0.0, Some(0.0), Some(2.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); AttackModule::clear(boma, 1, false); AttackModule::clear(boma, 2, false); } } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 27.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::get_int(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_INT_THUNDER_SWORD_CURRENT_POINT) == 0 { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { VisibilityModule::set_int64(boma, Hash40::new("sword").hash as i64, Hash40::new("sword_normal").hash as i64); @@ -449,71 +449,69 @@ unsafe extern "C" fn reflet_attack_air_lw_game(fighter: &mut L2CAgentBase) { } } frame(lua_state, 48.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING); } } -unsafe extern "C" fn reflet_attack_air_lw_effect(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn effect_attackairlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - EFFECT(fighter, Hash40::new("sys_smash_flash"), Hash40::new("sword"), 0, 5, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); + EFFECT(agent, Hash40::new("sys_smash_flash"), Hash40::new("sword"), 0, 5, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, true); } } frame(lua_state, 11.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_reflet_sword4"), Hash40::new("tex_reflet_sword2"), 6, Hash40::new("sword"), 0.0, 0.0, 0.0, Hash40::new("sword"), 0.0, 10.75, 0.0, true, Hash40::new("null"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); - EFFECT_FOLLOW(fighter, Hash40::new("reflet_thunderswoed"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); - EFFECT_FOLLOW(fighter, Hash40::new("reflet_thunderswoed_flare"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_reflet_sword4"), Hash40::new("tex_reflet_sword2"), 6, Hash40::new("sword"), 0.0, 0.0, 0.0, Hash40::new("sword"), 0.0, 10.75, 0.0, true, Hash40::new("null"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + EFFECT_FOLLOW(agent, Hash40::new("reflet_thunderswoed"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + EFFECT_FOLLOW(agent, Hash40::new("reflet_thunderswoed_flare"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } } frame(lua_state, 13.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - EFFECT_FOLLOW(fighter, Hash40::new("reflet_attack_flash"), Hash40::new("sword"), 0, 8.5, 0, 0, 0, 0, 1.8, true); + EFFECT_FOLLOW(agent, Hash40::new("reflet_attack_flash"), Hash40::new("sword"), 0, 8.5, 0, 0, 0, 0, 1.8, true); } else { - AFTER_IMAGE4_ON_arg29(fighter, Hash40::new("tex_reflet_sword1"), Hash40::new("tex_reflet_sword5"), 4, Hash40::new("sword"), 0.0, 0.4, 0.0, Hash40::new("sword"), 0.0, 8.5, 0.0, true, Hash40::new("reflet_swoed_flare"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); - EFFECT_FOLLOW(fighter, Hash40::new("reflet_attack_flash"), Hash40::new("sword"), 0, 7, 0, 0, 0, 0, 1.3, true); + AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_reflet_sword1"), Hash40::new("tex_reflet_sword5"), 4, Hash40::new("sword"), 0.0, 0.4, 0.0, Hash40::new("sword"), 0.0, 8.5, 0.0, true, Hash40::new("reflet_swoed_flare"), Hash40::new("sword"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.4, 0.1); + EFFECT_FOLLOW(agent, Hash40::new("reflet_attack_flash"), Hash40::new("sword"), 0, 7, 0, 0, 0, 0, 1.3, true); } } frame(lua_state, 18.0); - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("reflet_swoed_flare2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("reflet_swoed_flare2"), Hash40::new("sword"), 0, 0, 0, 0, 0, 0, 1, true); } frame(lua_state, 19.0); - if is_excute(fighter) { - AFTER_IMAGE_OFF(fighter, 2); + if is_excute(agent) { + AFTER_IMAGE_OFF(agent, 2); } frame(lua_state, 25.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - EFFECT_OFF_KIND(fighter, Hash40::new("reflet_thunderswoed"), false, false); + EFFECT_OFF_KIND(agent, Hash40::new("reflet_thunderswoed"), false, false); } } wait(lua_state, 2.0); - if is_excute(fighter) { - EFFECT_OFF_KIND(fighter, Hash40::new("reflet_thunderswoed_flare"), false, false); + if is_excute(agent) { + EFFECT_OFF_KIND(agent, Hash40::new("reflet_thunderswoed_flare"), false, false); } } -pub fn install() { - smashline::Agent::new("reflet") - .acmd("game_attackairn", reflet_attack_air_n_game) - .acmd("effect_attackairn", reflet_attack_air_n_effect) - .acmd("game_attackairf", reflet_attack_air_f_game) - .acmd("expression_attackairf", reflet_attack_air_f_expression) - .acmd("effect_attackairf", reflet_attack_air_f_effect) - .acmd("game_attackairb", reflet_attack_air_b_game) - .acmd("effect_attackairb", reflet_attack_air_b_effect) - .acmd("game_attackairhi", reflet_attack_air_hi_game) - .acmd("effect_attackairhi", reflet_attack_air_hi_effect) - .acmd("game_attackairlw", reflet_attack_air_lw_game) - .acmd("effect_attackairlw", reflet_attack_air_lw_effect) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attackairn", game_attackairn); + agent.acmd("effect_attackairn", effect_attackairn); + agent.acmd("game_attackairf", game_attackairf); + agent.acmd("expression_attackairf", expression_attackairf); + agent.acmd("effect_attackairf", effect_attackairf); + agent.acmd("game_attackairb", game_attackairb); + agent.acmd("effect_attackairb", effect_attackairb); + agent.acmd("game_attackairhi", game_attackairhi); + agent.acmd("effect_attackairhi", effect_attackairhi); + agent.acmd("game_attackairlw", game_attackairlw); + agent.acmd("effect_attackairlw", effect_attackairlw); } diff --git a/fighters/reflet/src/acmd/ground.rs b/fighters/reflet/src/acmd/ground.rs index 9598da2f4e..98d9569a0f 100644 --- a/fighters/reflet/src/acmd/ground.rs +++ b/fighters/reflet/src/acmd/ground.rs @@ -1,182 +1,180 @@ use super::*; -unsafe extern "C" fn reflet_attack_11_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.5); +unsafe extern "C" fn game_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.5); } frame(lua_state, 2.5); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 3.0, 361, 25, 0, 30, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 3.0, 361, 25, 0, 30, 3.0, -2.0, 2.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword"), 3.0, 361, 25, 0, 30, 3.5, -3.0, 6.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 3.0, 361, 25, 0, 30, 3.0, 0.0, 0.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 3.0, 361, 25, 0, 30, 3.0, -2.0, 2.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword"), 3.0, 361, 25, 0, 30, 3.5, -3.0, 6.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 3.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 2.5); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 3.0, 361, 25, 0, 30, 3.0, 0.0, 2.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword"), 3.0, 361, 25, 0, 30, 3.5, 0.0, 6.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + FT_MOTION_RATE(agent, 2.5); + ATTACK(agent, 1, 0, Hash40::new("sword"), 3.0, 361, 25, 0, 30, 3.0, 0.0, 2.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword"), 3.0, 361, 25, 0, 30, 3.5, 0.0, 6.0, 0.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 4.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 12.0/(22.0-7.0)); + if is_excute(agent) { + FT_MOTION_RATE(agent, 12.0/(22.0-7.0)); AttackModule::clear_all(boma); } frame(lua_state, 5.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { //WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_NO_HIT_COMBO); } } -unsafe extern "C" fn reflet_attack_11_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attack11(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword"), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y), AttackDirectionAxis(*ATTACK_DIRECTION_X)); ItemModule::set_have_item_visibility(boma, false, 0); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 0.5); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 8, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 2.5); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashs"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashs"), 0); } } -unsafe extern "C" fn reflet_attack_12_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 2.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 2.0); } frame(lua_state, 4.5); - if is_excute(fighter) { - ATTACK(fighter, 1, 0, Hash40::new("top"), 3.0, 361, 25, 0, 25, 3.0, 0.0, 8.5, 8.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 3.0, 361, 25, 0, 25, 3.5, 0.0, 8.5, 12.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 0, 0, Hash40::new("top"), 3.0, 135, 20, 0, 27, 3.5, 0.0, 8.5, 16.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 3.0, 361, 20, 0, 20, 3.5, 0.0, 8.5, 16.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 1, 0, Hash40::new("top"), 3.0, 361, 25, 0, 25, 3.0, 0.0, 8.5, 8.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 3.0, 361, 25, 0, 25, 3.5, 0.0, 8.5, 12.0, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 3.0, 135, 20, 0, 27, 3.5, 0.0, 8.5, 16.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_FIGHTER, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 3.0, 361, 20, 0, 20, 3.5, 0.0, 8.5, 16.5, None, None, None, 1.1, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 5.0); - if is_excute(fighter) { - FT_MOTION_RATE(fighter, 1.0); + if is_excute(agent) { + FT_MOTION_RATE(agent, 1.0); AttackModule::clear_all(boma); } if WorkModule::get_int(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_INT_SPECIAL_HI_CURRENT_POINT) > 1 { - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); } } frame(lua_state, 7.0); if WorkModule::get_float(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLOAT_SPECIAL_S_CURRENT_POINT) > 0.1 { - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_COMBO); } } frame(lua_state, 9.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::off_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_ENABLE_100); } } -unsafe extern "C" fn reflet_attack_12_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attack12(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword"), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y), AttackDirectionAxis(*ATTACK_DIRECTION_X)); ItemModule::set_have_item_visibility(boma, false, 0); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 2.5); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohits"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 4.5); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashs"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashs"), 0); } } -unsafe extern "C" fn reflet_attack_13_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attack13(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 6.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 361, 124, 0, 70, 7.0, 0.0, 12.0, 16.0, Some(0.0), Some(12.0), Some(14.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 361, 124, 0, 70, 7.0, 0.0, 12.0, 16.0, Some(0.0), Some(12.0), Some(14.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); } wait(lua_state, 2.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn reflet_attack_100_game(fighter: &mut L2CAgentBase) { +unsafe extern "C" fn game_attack100(agent: &mut L2CAgentBase) { for _ in 0..99 { - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.9, 65, 10, 0, 9, 8.0, 0.0, 9.0, 12.0, Some(0.0), Some(9.0), Some(8.0), 0.4, 0.4, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - AttackModule::set_add_reaction_frame(fighter.module_accessor, 0, 3.0, false); - ATK_SET_SHIELD_SETOFF_MUL(fighter, 0, 3); - WorkModule::on_flag(fighter.module_accessor, *FIGHTER_STATUS_ATTACK_FLAG_100_CONTINUE_CHECK); - wait_loop_clear(fighter); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.9, 65, 10, 0, 9, 8.0, 0.0, 9.0, 12.0, Some(0.0), Some(9.0), Some(8.0), 0.4, 0.4, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 3, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + AttackModule::set_add_reaction_frame(agent.module_accessor, 0, 3.0, false); + ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 3); + WorkModule::on_flag(agent.module_accessor, *FIGHTER_STATUS_ATTACK_FLAG_100_CONTINUE_CHECK); + wait_loop_clear(agent); } } } -unsafe extern "C" fn reflet_attack_100_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; +unsafe extern "C" fn game_attack100end(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; frame(lua_state, 5.0); - if is_excute(fighter) { - AttackModule::clear_all(fighter.module_accessor); - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.0, 74, 186, 0, 80, 5.0, 0.0, 13.0, 9.0, Some(0.0), Some(6.5), Some(9.0), 3.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.0, 74, 186, 0, 80, 5.0, 0.0, 13.0, 17.0, Some(0.0), Some(6.5), Some(17.0), 3.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + if is_excute(agent) { + AttackModule::clear_all(agent.module_accessor); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.0, 74, 186, 0, 80, 5.0, 0.0, 13.0, 9.0, Some(0.0), Some(6.5), Some(9.0), 3.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.0, 74, 186, 0, 80, 5.0, 0.0, 13.0, 17.0, Some(0.0), Some(6.5), Some(17.0), 3.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); } wait(lua_state, 2.0); - FT_MOTION_RATE(fighter, 1.1); + FT_MOTION_RATE(agent, 1.1); frame(lua_state, 10.0); - if is_excute(fighter) { - AttackModule::clear_all(fighter.module_accessor); + if is_excute(agent) { + AttackModule::clear_all(agent.module_accessor); } } -unsafe extern "C" fn reflet_attack_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackdash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 12.5, 38, 52, 0, 70, 4.0, 0.0, 7.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 12.5, 38, 52, 0, 70, 4.0, 0.0, 2.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 12.5, 38, 52, 0, 70, 3.4, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword"), 12.5, 38, 52, 0, 70, 4.0, 0.0, 7.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 12.5, 38, 52, 0, 70, 4.0, 0.0, 2.0, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 12.5, 38, 52, 0, 70, 3.4, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 7.5, 75, 50, 0, 80, 3.5, 0.0, 6.5, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 7.5, 75, 50, 0, 80, 3.5, 0.0, 1.5, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 7.5, 75, 50, 0, 80, 3.4, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword"), 7.5, 75, 50, 0, 80, 3.5, 0.0, 6.5, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 7.5, 75, 50, 0, 80, 3.5, 0.0, 1.5, -0.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 7.5, 75, 50, 0, 80, 3.4, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } wait(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -pub fn install() { - smashline::Agent::new("reflet") - .acmd("game_attack11", reflet_attack_11_game) - .acmd("expression_attack11", reflet_attack_11_expression) - .acmd("game_attack12", reflet_attack_12_game) - .acmd("expression_attack12", reflet_attack_12_expression) - .acmd("game_attack13", reflet_attack_13_game) - .acmd("game_attack100", reflet_attack_100_game) - .acmd("game_attack100end", reflet_attack_100_end_game) - .acmd("game_attackdash", reflet_attack_dash_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attack11", game_attack11); + agent.acmd("expression_attack11", expression_attack11); + agent.acmd("game_attack12", game_attack12); + agent.acmd("expression_attack12", expression_attack12); + agent.acmd("game_attack13", game_attack13); + agent.acmd("game_attack100", game_attack100); + agent.acmd("game_attack100end", game_attack100end); + agent.acmd("game_attackdash", game_attackdash); } diff --git a/fighters/reflet/src/acmd/mod.rs b/fighters/reflet/src/acmd/mod.rs index 484e04a282..095a2343a6 100644 --- a/fighters/reflet/src/acmd/mod.rs +++ b/fighters/reflet/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/reflet/src/acmd/other.rs b/fighters/reflet/src/acmd/other.rs index a7b427c197..c650fb3d19 100644 --- a/fighters/reflet/src/acmd/other.rs +++ b/fighters/reflet/src/acmd/other.rs @@ -1,313 +1,182 @@ use super::*; -unsafe extern "C" fn damageflyhi_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_reflet_rnd_futtobi01"), Hash40::new("seq_reflet_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_reflet_rnd_futtobi01"), Hash40::new("seq_reflet_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_reflet_rnd_futtobi01"), Hash40::new("seq_reflet_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_reflet_rnd_futtobi01"), Hash40::new("seq_reflet_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflylw_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflylw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_reflet_rnd_futtobi01"), Hash40::new("seq_reflet_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_reflet_rnd_futtobi01"), Hash40::new("seq_reflet_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_reflet_rnd_futtobi01"), Hash40::new("seq_reflet_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_reflet_rnd_futtobi01"), Hash40::new("seq_reflet_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflyn_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_reflet_rnd_futtobi01"), Hash40::new("seq_reflet_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_reflet_rnd_futtobi01"), Hash40::new("seq_reflet_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_reflet_rnd_futtobi01"), Hash40::new("seq_reflet_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_reflet_rnd_futtobi01"), Hash40::new("seq_reflet_rnd_futtobi02"));} } } -unsafe extern "C" fn damageflyroll_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflyroll(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_reflet_rnd_futtobi01"), Hash40::new("seq_reflet_rnd_futtobi02")); + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_reflet_rnd_futtobi01"), Hash40::new("seq_reflet_rnd_futtobi02")); } } frame(lua_state, 1.1); - if is_excute(fighter) { - PLAY_FLY_VOICE(fighter, Hash40::new("seq_reflet_rnd_futtobi01"), Hash40::new("seq_reflet_rnd_futtobi02")); + if is_excute(agent) { + PLAY_FLY_VOICE(agent, Hash40::new("seq_reflet_rnd_futtobi01"), Hash40::new("seq_reflet_rnd_futtobi02")); } } -unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_damageflytop(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - if is_excute(fighter) { - if !StopModule::is_stop(fighter.module_accessor) { + if is_excute(agent) { + if !StopModule::is_stop(agent.module_accessor) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_reflet_rnd_futtobi01"), Hash40::new("seq_reflet_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_reflet_rnd_futtobi01"), Hash40::new("seq_reflet_rnd_futtobi02"));} } } frame(lua_state, 1.1); - if is_excute(fighter) { + if is_excute(agent) { let play_vc = if DamageModule::reaction(boma, 0) < 100.0 { app::sv_math::rand(hash40("fighter"), 3) } else { 0 }; - if play_vc == 0 {PLAY_FLY_VOICE(fighter, Hash40::new("seq_reflet_rnd_futtobi01"), Hash40::new("seq_reflet_rnd_futtobi02"));} + if play_vc == 0 {PLAY_FLY_VOICE(agent, Hash40::new("seq_reflet_rnd_futtobi01"), Hash40::new("seq_reflet_rnd_futtobi02"));} } } -unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn sound_dash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { - let dash_sfx_handle = SoundModule::play_se(fighter.module_accessor, Hash40::new("se_reflet_dash_start"), true, false, false, false, app::enSEType(0)); + if is_excute(agent) { + let dash_sfx_handle = SoundModule::play_se(agent.module_accessor, Hash40::new("se_reflet_dash_start"), true, false, false, false, app::enSEType(0)); SoundModule::set_se_vol(boma, dash_sfx_handle as i32, 0.5, 0); } } -unsafe extern "C" fn reflet_turn_dash_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_turndash(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_DASH_FLAG_TURN_DASH); } frame(lua_state, 17.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::enable_transition_term(boma, *FIGHTER_STATUS_TRANSITION_TERM_ID_DASH_TO_RUN); } } -unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeair(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame")); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_FALL); } frame(lua_state, escape_air_cancel_frame); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_escapeairslide(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 29.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ESCAPE_AIR_FLAG_SLIDE_ENABLE_CONTROL); } frame(lua_state, 39.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); - } -} - -unsafe extern "C" fn reflet_elwind_shoot0_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - GroundModule::modify_rhombus(boma, 0.0, 1.0, 1.0); - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 80, 30, 0, 100, 6.0, 0.0, 2.0, 0.5, Some(0.0), Some(-3.5), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - } - wait(lua_state, 4.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 5.0, 80, 30, 0, 100, 7.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); - } -} - -unsafe extern "C" fn reflet_elwind_landing_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 0.0, 361, 100, 55, 0, 10.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); - AttackModule::clear(boma, 1, false); - } - frame(lua_state, 5.0); - if is_excute(fighter) { - notify_event_msc_cmd!(fighter, Hash40::new_raw(0x199c462b5d)); - } -} - -unsafe extern "C" fn reflet_arcthunder_shoot2_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ControlModule::set_rumble(fighter.module_accessor, Hash40::new("rbkind_nohits"),0, false, *BATTLE_OBJECT_ID_INVALID as u32); - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 70, 35, 0, 50, 3.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); - AttackModule::enable_safe_pos(boma); - } - frame(lua_state, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 6.0, 70, 35, 0, 50, 3.2, 0.0, -0.7, 0.0, Some(0.0), Some(0.7), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); - } -} - -unsafe extern "C" fn reflet_arcthunder_spark_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ControlModule::set_rumble(fighter.module_accessor, Hash40::new("rbkind_explosionm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); - ATTACK(fighter, 0, 0, Hash40::new("top"), 2.4, 110, 100, 20, 0, 6.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 0.2, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 0, Hash40::new("top"), 2.4, 366, 100, 16, 0, 2.0, 0.0, 12.0, 12.0, Some(0.0), Some(-12.0), Some(-12.0), 0.2, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 2, 0, Hash40::new("top"), 2.4, 366, 100, 16, 0, 2.0, 0.0, 12.0, -12.0, Some(0.0), Some(-12.0), Some(12.0), 0.2, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); - } - frame(lua_state, 24.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 1, Hash40::new("top"), 3.0, 50, 166, 0, 75, 3.0, 0.0, 12.0, 12.0, Some(0.0), Some(-12.0), Some(-12.0), 0.6, 1.0,*ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); - ATTACK(fighter, 1, 1, Hash40::new("top"), 3.0, 50, 166, 0, 75, 3.0, 0.0, 12.0, -12.0, Some(0.0), Some(-12.0), Some(12.0), 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); - } - frame(lua_state, 25.0); - if is_excute(fighter) { - AttackModule::clear_all(boma); - } -} - -unsafe extern "C" fn reflet_thoron_game(agent: &mut L2CAgentBase) { - let lua_state = agent.lua_state_agent; - let reflet_boma = &mut *sv_battle_object::module_accessor((WorkModule::get_int(agent.boma(), *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); - let charge = VarModule::get_int(reflet_boma.object(), vars::reflet::instance::THUNDER_CHARGE); - //let damage = (1 + (charge-1)*9/14) as f32; - let damage = 1.5 + (charge/2) as f32; if is_excute(agent) { - if charge > 0 && charge <= 8 { - ATTACK(agent, 0, 0, Hash40::new("top"), damage, 45, 145, 0, 75, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -0.5, 0.0, 4, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); - - } else { - ATTACK(agent, 0, 0, Hash40::new("top"), 5.5, 45, 145, 0, 75, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); - } - AttackModule::set_no_finish_camera(agent.boma(), 0, true, false); - } -} - -unsafe extern "C" fn reflet_arcfire_burn_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - AREA_WIND_2ND_RAD_arg9(fighter, 0, 1, 0.05, 200, 0.8, 0, 9, 15, 60); - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.3, 120, 100, 15, 0, 3.8, 0.0, 8.0, 0.0, Some(0.0), Some(1.0), Some(0.0), 0.5, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -0.5, 0.0, 8, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); - } - wait(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.3, 115, 100, 15, 0, 4.0, 0.0, 9.0, 0.0, Some(0.0), Some(1.0), Some(0.0), 0.5, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -0.5, 0.0, 8, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); - } - wait(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.3, 110, 100, 15, 0, 4.0, 0.0, 9.0, 0.0, Some(0.0), Some(1.0), Some(0.0), 0.5, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -0.5, 0.0, 8, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); - } -} - -unsafe extern "C" fn reflet_arcfire_rise_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - QUAKE(fighter, *CAMERA_QUAKE_KIND_S); - AREA_WIND_2ND_RAD_arg9(fighter, 0, 1, 0.05, 200, 1, 0, 5, 12, 60); - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.3, 96, 100, 15, 0, 3.4, 0.0, 7.0, 0.0, Some(0.0), Some(1.0), Some(0.0), 0.5, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -0.5, 0.0, 4, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); - } - wait(lua_state, 10.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 1.3, 96, 100, 15, 0, 3.6, 0.0, 7.0, 0.0, Some(0.0), Some(1.0), Some(0.0), 0.5, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -0.5, 0.0, 4, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); - } -} - -unsafe extern "C" fn reflet_arcfire_rise_effect(fighter: &mut L2CAgentBase) { - if is_excute(fighter) { - EFFECT_FOLLOW(fighter, Hash40::new("reflet_gigafire_firepillar"), Hash40::new("top"), -0.0, 0, 0, 0, 0, 0, 1, true); - LAST_EFFECT_SET_RATE(fighter, 1.45); + notify_event_msc_cmd!(agent, Hash40::new_raw(0x2127e37c07), *GROUND_CLIFF_CHECK_KIND_ALWAYS_BOTH_SIDES); } } -pub fn install() { - smashline::Agent::new("reflet_gigafire") - .acmd("game_burn", reflet_arcfire_burn_game) - .acmd("game_rise", reflet_arcfire_rise_game) - .acmd("effect_rise", reflet_arcfire_rise_effect) - .install(); - smashline::Agent::new("reflet") - .acmd("sound_damageflyhi", damageflyhi_sound) - .acmd("sound_damageflylw", damageflylw_sound) - .acmd("sound_damageflyn", damageflyn_sound) - .acmd("sound_damageflyroll", damageflyroll_sound) - .acmd("sound_damageflytop", damageflytop_sound) - .acmd("sound_dash", dash_sound) - .acmd("game_turndash", reflet_turn_dash_game) - .acmd("game_escapeair", escape_air_game) - .acmd("game_escapeairslide", escape_air_slide_game) - .install(); - smashline::Agent::new("reflet_thunder") - .acmd("game_shoot2", reflet_arcthunder_shoot2_game) - .acmd("game_gigaspark", reflet_arcthunder_spark_game) - .acmd("game_tron0", reflet_thoron_game) - .install(); - smashline::Agent::new("reflet_elwind") - .acmd("game_shoot0", reflet_elwind_shoot0_game) - .acmd("game_landing", reflet_elwind_landing_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("sound_damageflyhi", sound_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("sound_dash", sound_dash); + agent.acmd("game_turndash", game_turndash); + agent.acmd("game_escapeair", game_escapeair); + agent.acmd("game_escapeairslide", game_escapeairslide); } diff --git a/fighters/reflet/src/acmd/smashes.rs b/fighters/reflet/src/acmd/smashes.rs index 3fc3547a9e..5e40cf17e9 100644 --- a/fighters/reflet/src/acmd/smashes.rs +++ b/fighters/reflet/src/acmd/smashes.rs @@ -1,35 +1,35 @@ use super::*; -unsafe extern "C" fn reflet_attack_s4_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 0.323); + FT_MOTION_RATE(agent, 0.323); frame(lua_state, 6.0); - FT_MOTION_RATE(fighter, 1.000); + FT_MOTION_RATE(agent, 1.000); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 16.0); - FT_MOTION_RATE(fighter, 1.000); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 1.000); + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 18.0, 361, 87, 0, 55, 5.0, 1.0, 8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 18.0, 361, 87, 0, 55, 5.0, 1.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 18.0, 361, 87, 0, 55, 3.5, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword"), 18.0, 361, 87, 0, 55, 5.0, 1.0, 8.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 18.0, 361, 87, 0, 55, 5.0, 1.0, 1.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 18.0, 361, 87, 0, 55, 3.5, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); } if !WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 12.6, 361, 83, 0, 54, 4.0, 1.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 12.6, 361, 83, 0, 54, 4.0, 1.0, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 12.6, 361, 83, 0, 54, 3.5, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword"), 12.6, 361, 83, 0, 54, 4.0, 1.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 12.6, 361, 83, 0, 54, 4.0, 1.0, 0.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 12.6, 361, 83, 0, 54, 3.5, 0.0, 0.0, -1.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } } wait(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 10.0, 361, 100, 0, 60, 3.0, 0.0, 9.0, 0.0, Some(0.0), Some(2.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("sword"), 10.0, 361, 100, 0, 60, 3.0, 0.0, 9.0, 0.0, Some(0.0), Some(2.0), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); AttackModule::clear(boma, 1, false); AttackModule::clear(boma, 2, false); } @@ -38,11 +38,11 @@ unsafe extern "C" fn reflet_attack_s4_s_game(fighter: &mut L2CAgentBase) { } } wait(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 32.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::get_int(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_INT_THUNDER_SWORD_CURRENT_POINT) == 0 { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { VisibilityModule::set_int64(boma, Hash40::new("sword").hash as i64, Hash40::new("sword_normal").hash as i64); @@ -52,72 +52,72 @@ unsafe extern "C" fn reflet_attack_s4_s_game(fighter: &mut L2CAgentBase) { } -unsafe extern "C" fn reflet_attack_lw4_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw4(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_FLAG_START_SMASH_HOLD); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - QUAKE(fighter, *CAMERA_QUAKE_KIND_S); - ATTACK(fighter, 0, 0, Hash40::new("top"), 15.0, 55, 98, 0, 50, 4.5, 0.0, 13.0, 5.0, Some(0.0), Some(2.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 15.0, 55, 98, 0, 50, 4.5, 0.0, 16.0, 12.0, Some(0.0), Some(2.0), Some(12.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + QUAKE(agent, *CAMERA_QUAKE_KIND_S); + ATTACK(agent, 0, 0, Hash40::new("top"), 15.0, 55, 98, 0, 50, 4.5, 0.0, 13.0, 5.0, Some(0.0), Some(2.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 15.0, 55, 98, 0, 50, 4.5, 0.0, 16.0, 12.0, Some(0.0), Some(2.0), Some(12.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); } if !WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 8.0, 28, 105, 0, 50, 3.0, 0.0, 13.0, 5.0, Some(0.0), Some(2.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 8.0, 28, 105, 0, 50, 3.0, 0.0, 16.0, 10.0, Some(0.0), Some(2.0), Some(10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 0, 0, Hash40::new("top"), 8.0, 28, 105, 0, 50, 3.0, 0.0, 13.0, 5.0, Some(0.0), Some(2.0), Some(5.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 8.0, 28, 105, 0, 50, 3.0, 0.0, 16.0, 10.0, Some(0.0), Some(2.0), Some(10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_HIGH), false); } } frame(lua_state, 18.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 19.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - ATTACK(fighter, 2, 0, Hash40::new("top"), 12.0, 45, 100, 0, 50, 4.6, 0.0, 3.5, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 12.0, 45, 100, 0, 50, 4.6, 0.0, 3.5, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 12.0, 45, 100, 0, 50, 4.6, 0.0, 3.5, 10.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 12.0, 45, 100, 0, 50, 4.6, 0.0, 3.5, -2.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); } } frame(lua_state, 20.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - ATTACK(fighter, 2, 0, Hash40::new("top"), 12.0, 45, 100, 0, 50, 4.6, 0.0, 3.5, 14.5, Some(0.0), Some(3.5), Some(10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 12.0, 45, 100, 0, 50, 4.6, 0.0, 3.5, -6.5, Some(0.0), Some(3.5), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 12.0, 45, 100, 0, 50, 4.6, 0.0, 3.5, 14.5, Some(0.0), Some(3.5), Some(10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 12.0, 45, 100, 0, 50, 4.6, 0.0, 3.5, -6.5, Some(0.0), Some(3.5), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); } } frame(lua_state, 21.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - ATTACK(fighter, 2, 0, Hash40::new("top"), 12.0, 45, 100, 0, 50, 4.6, 0.0, 3.5, 19.0, Some(0.0), Some(3.5), Some(10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 12.0, 45, 100, 0, 50, 4.6, 0.0, 3.5, -11.0, Some(0.0), Some(3.5), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 12.0, 45, 100, 0, 50, 4.6, 0.0, 3.5, 19.0, Some(0.0), Some(3.5), Some(10.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 12.0, 45, 100, 0, 50, 4.6, 0.0, 3.5, -11.0, Some(0.0), Some(3.5), Some(-2.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); } } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - ATTACK(fighter, 2, 0, Hash40::new("top"), 10.0, 45, 100, 0, 50, 4.6, 0.0, 3.5, 19.0, Some(0.0), Some(3.5), Some(14.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 10.0, 45, 100, 0, 50, 4.6, 0.0, 3.5, -11.0, Some(0.0), Some(3.5), Some(-6.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 10.0, 45, 100, 0, 50, 4.6, 0.0, 3.5, 19.0, Some(0.0), Some(3.5), Some(14.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 10.0, 45, 100, 0, 50, 4.6, 0.0, 3.5, -11.0, Some(0.0), Some(3.5), Some(-6.5), 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); } } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { - ATTACK(fighter, 2, 0, Hash40::new("top"), 10.0, 45, 100, 0, 50, 4.6, 0.0, 3.5, 19.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); - ATTACK(fighter, 3, 0, Hash40::new("top"), 10.0, 45, 100, 0, 50, 4.6, 0.0, 3.5, -11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 10.0, 45, 100, 0, 50, 4.6, 0.0, 3.5, 19.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); + ATTACK(agent, 3, 0, Hash40::new("top"), 10.0, 45, 100, 0, 50, 4.6, 0.0, 3.5, -11.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_B, false, 0, 0.0, 0, false, false, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_SWORD); } } frame(lua_state, 29.0); - FT_MOTION_RATE(fighter, 0.800); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 0.800); + if is_excute(agent) { AttackModule::clear_all(boma); } frame(lua_state, 30.0); - if is_excute(fighter) { + if is_excute(agent) { if WorkModule::is_flag(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON) { if WorkModule::get_int(boma, *FIGHTER_REFLET_INSTANCE_WORK_ID_INT_THUNDER_SWORD_CURRENT_POINT) == 0 { VisibilityModule::set_int64(boma, Hash40::new("sword").hash as i64, Hash40::new("sword_normal").hash as i64); @@ -128,9 +128,7 @@ unsafe extern "C" fn reflet_attack_lw4_game(fighter: &mut L2CAgentBase) { } -pub fn install() { - smashline::Agent::new("reflet") - .acmd("game_attacks4", reflet_attack_s4_s_game) - .acmd("game_attacklw4", reflet_attack_lw4_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks4", game_attacks4); + agent.acmd("game_attacklw4", game_attacklw4); } diff --git a/fighters/reflet/src/acmd/specials.rs b/fighters/reflet/src/acmd/specials.rs index f67b622627..5930cd5bd6 100644 --- a/fighters/reflet/src/acmd/specials.rs +++ b/fighters/reflet/src/acmd/specials.rs @@ -1,50 +1,50 @@ use super::*; -unsafe extern "C" fn reflet_special_n_tron_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialntronstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 15.0/(19.0-1.0)); + FT_MOTION_RATE(agent, 15.0/(19.0-1.0)); frame(lua_state, 19.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn reflet_special_air_n_tron_start_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairntronstart(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 15.0/(19.0-1.0)); + FT_MOTION_RATE(agent, 15.0/(19.0-1.0)); frame(lua_state, 19.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn reflet_special_n_tron_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 0.7); //FAF is frame 61 +unsafe extern "C" fn game_specialntronend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 0.7); //FAF is frame 61 } -unsafe extern "C" fn reflet_special_air_n_tron_end_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - FT_MOTION_RATE(fighter, 0.35); //FAF is frame 63 +unsafe extern "C" fn game_specialairntronend(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + FT_MOTION_RATE(agent, 0.35); //FAF is frame 63 } -unsafe extern "C" fn reflet_special_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_REFLET_GENERATE_ARTICLE_ELWIND, false, 0); WorkModule::on_flag(boma, *FIGHTER_REFLET_STATUS_SPECIAL_HI_FLAG_JUMP); } frame(lua_state, 9.0); - if is_excute(fighter) { - VarModule::on_flag(fighter.battle_object, vars::common::instance::UP_SPECIAL_CANCEL); + if is_excute(agent) { + VarModule::on_flag(agent.battle_object, vars::common::instance::UP_SPECIAL_CANCEL); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { if (ControlModule::check_button_on_trriger(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on_trriger(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW)) { WorkModule::on_flag(boma, *FIGHTER_REFLET_STATUS_SPECIAL_HI_FLAG_TRY_2ND); } @@ -54,7 +54,7 @@ unsafe extern "C" fn reflet_special_hi_game(fighter: &mut L2CAgentBase) { } wait(lua_state, 1.0); for _ in 0..30 { - if is_excute(fighter) { + if is_excute(agent) { if (ControlModule::check_button_on_trriger(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on_trriger(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW)) { WorkModule::on_flag(boma, *FIGHTER_REFLET_STATUS_SPECIAL_HI_FLAG_TRY_2ND); } @@ -64,20 +64,20 @@ unsafe extern "C" fn reflet_special_hi_game(fighter: &mut L2CAgentBase) { } -unsafe extern "C" fn reflet_special_air_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_specialairhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 8.0); - if is_excute(fighter) { + if is_excute(agent) { ArticleModule::generate_article(boma, *FIGHTER_REFLET_GENERATE_ARTICLE_ELWIND, false, 0); WorkModule::on_flag(boma, *FIGHTER_REFLET_STATUS_SPECIAL_HI_FLAG_JUMP); } frame(lua_state, 9.0); - if is_excute(fighter) { - VarModule::on_flag(fighter.battle_object, vars::common::instance::UP_SPECIAL_CANCEL); + if is_excute(agent) { + VarModule::on_flag(agent.battle_object, vars::common::instance::UP_SPECIAL_CANCEL); } frame(lua_state, 12.0); - if is_excute(fighter) { + if is_excute(agent) { if (ControlModule::check_button_on_trriger(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW)) { WorkModule::on_flag(boma, *FIGHTER_REFLET_STATUS_SPECIAL_HI_FLAG_TRY_2ND); } @@ -87,7 +87,7 @@ unsafe extern "C" fn reflet_special_air_hi_game(fighter: &mut L2CAgentBase) { } wait(lua_state, 1.0); for _ in 0..30 { - if is_excute(fighter) { + if is_excute(agent) { if (ControlModule::check_button_on_trriger(boma, *CONTROL_PAD_BUTTON_SPECIAL) || ControlModule::check_button_on(boma, *CONTROL_PAD_BUTTON_SPECIAL_RAW)) { WorkModule::on_flag(boma, *FIGHTER_REFLET_STATUS_SPECIAL_HI_FLAG_TRY_2ND); } @@ -97,19 +97,11 @@ unsafe extern "C" fn reflet_special_air_hi_game(fighter: &mut L2CAgentBase) { } -pub fn install() { - smashline::Agent::new("reflet") - .acmd("game_specialntronstart", reflet_special_n_tron_start_game) - .acmd( - "game_specialairntronstart", - reflet_special_air_n_tron_start_game, - ) - .acmd("game_specialntronend", reflet_special_n_tron_end_game) - .acmd( - "game_specialairntronend", - reflet_special_air_n_tron_end_game, - ) - .acmd("game_specialhi", reflet_special_hi_game) - .acmd("game_specialairhi", reflet_special_air_hi_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_specialntronstart", game_specialntronstart); + agent.acmd( "game_specialairntronstart",game_specialairntronstart); + agent.acmd("game_specialntronend", game_specialntronend); + agent.acmd("game_specialairntronend",game_specialairntronend); + agent.acmd("game_specialhi", game_specialhi); + agent.acmd("game_specialairhi", game_specialairhi); } diff --git a/fighters/reflet/src/acmd/throws.rs b/fighters/reflet/src/acmd/throws.rs index 285f1bfbe7..0759b61c76 100644 --- a/fighters/reflet/src/acmd/throws.rs +++ b/fighters/reflet/src/acmd/throws.rs @@ -1,31 +1,31 @@ use super::*; -unsafe extern "C" fn reflet_catch_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_catch(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE(fighter, 2.0); + FT_MOTION_RATE(agent, 2.0); frame(lua_state, 2.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { GrabModule::set_rebound(boma, true); } frame(lua_state, 7.0); - if is_excute(fighter) { - CATCH(fighter, 0, Hash40::new("top"), 4.3, 0.0, 8.0, 0.0, Some(0.0), Some(8.0), Some(10.2), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); + if is_excute(agent) { + CATCH(agent, 0, Hash40::new("top"), 4.3, 0.0, 8.0, 0.0, Some(0.0), Some(8.0), Some(10.2), *FIGHTER_STATUS_KIND_CAPTURE_PULLED, *COLLISION_SITUATION_MASK_GA); } - game_CaptureCutCommon(fighter); + game_CaptureCutCommon(agent); wait(lua_state, 2.0); - if is_excute(fighter) { - grab!(fighter, *MA_MSC_CMD_GRAB_CLEAR_ALL); + if is_excute(agent) { + grab!(agent, *MA_MSC_CMD_GRAB_CLEAR_ALL); WorkModule::on_flag(boma, *FIGHTER_STATUS_CATCH_FLAG_CATCH_WAIT); GrabModule::set_rebound(boma, false); } } -unsafe extern "C" fn reflet_catch_dash_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchdash(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 9.0); @@ -45,7 +45,7 @@ unsafe extern "C" fn reflet_catch_dash_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn reflet_catch_turn_game(agent: &mut L2CAgentBase) { +unsafe extern "C" fn game_catchturn(agent: &mut L2CAgentBase) { let lua_state = agent.lua_state_agent; let boma = agent.boma(); frame(lua_state, 10.0); @@ -65,83 +65,81 @@ unsafe extern "C" fn reflet_catch_turn_game(agent: &mut L2CAgentBase) { } } -unsafe extern "C" fn reflet_throw_b_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 11.0, 52, 77, 0, 85, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwb(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 11.0, 52, 77, 0, 85, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 24.0); - if is_excute(fighter) { + if is_excute(agent) { WorkModule::on_flag(boma, *FIGHTER_INSTANCE_WORK_ID_FLAG_REVERSE_LR_FINISH_CAMERA_THROW_ORBIT); - CHECK_FINISH_CAMERA(fighter, 21, 9); + CHECK_FINISH_CAMERA(agent, 21, 9); } frame(lua_state, 25.0); - if is_excute(fighter) { - REVERSE_LR(fighter); + if is_excute(agent) { + REVERSE_LR(agent); let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } } -unsafe extern "C" fn reflet_throw_hi_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0, 97, 60, 0, 86, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwhi(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 9.0, 97, 60, 0, 86, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 14.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 13, 18); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 13, 18); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } frame(lua_state, 18.0); - FT_MOTION_RATE_RANGE(fighter, 18.0, 47.0, 19.0); + FT_MOTION_RATE_RANGE(agent, 18.0, 47.0, 19.0); frame(lua_state, 47.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn reflet_throw_lw_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 85, 108, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); - ATTACK_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); +unsafe extern "C" fn game_throwlw(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, 0, 6.0, 85, 108, 0, 50, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_magic"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); + ATTACK_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_CATCH, 0, 3.0, 361, 100, 0, 40, 0.0, 1.0, *ATTACK_LR_CHECK_F, 0.0, true, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_THROW); } frame(lua_state, 15.0); - if is_excute(fighter) { - CHECK_FINISH_CAMERA(fighter, 11, 6); + if is_excute(agent) { + CHECK_FINISH_CAMERA(agent, 11, 6); } frame(lua_state, 16.0); - if is_excute(fighter) { + if is_excute(agent) { let target = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_OBJECT); let target_group = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_GROUP); let target_no = WorkModule::get_int64(boma, *FIGHTER_STATUS_THROW_WORK_INT_TARGET_HIT_NO); - ATK_HIT_ABS(fighter, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); + ATK_HIT_ABS(agent, *FIGHTER_ATTACK_ABSOLUTE_KIND_THROW, Hash40::new("throw"), target, target_group, target_no); } frame(lua_state, 24.0); - FT_MOTION_RATE_RANGE(fighter, 24.0, 37.0, 11.0); + FT_MOTION_RATE_RANGE(agent, 24.0, 37.0, 11.0); frame(lua_state, 37.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -pub fn install() { - smashline::Agent::new("reflet") - .acmd("game_catch", reflet_catch_game) - .acmd("game_catchdash", reflet_catch_dash_game) - .acmd("game_catchturn", reflet_catch_turn_game) - .acmd("game_throwb", reflet_throw_b_game) - .acmd("game_throwhi", reflet_throw_hi_game) - .acmd("game_throwlw", reflet_throw_lw_game) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_catch", game_catch); + agent.acmd("game_catchdash", game_catchdash); + agent.acmd("game_catchturn", game_catchturn); + agent.acmd("game_throwb", game_throwb); + agent.acmd("game_throwhi", game_throwhi); + agent.acmd("game_throwlw", game_throwlw); } diff --git a/fighters/reflet/src/acmd/tilts.rs b/fighters/reflet/src/acmd/tilts.rs index 7380fc2422..8fc01fd78a 100644 --- a/fighters/reflet/src/acmd/tilts.rs +++ b/fighters/reflet/src/acmd/tilts.rs @@ -1,158 +1,156 @@ use super::*; -unsafe extern "C" fn reflet_attack_s3_s_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 7.0); - FT_MOTION_RATE(fighter, 2.0); + FT_MOTION_RATE(agent, 2.0); frame(lua_state, 8.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 35, 59, 0, 67, 3.5, 0.0, 19.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 35, 59, 0, 67, 3.5, 0.0, 16.0, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 11.0, 35, 59, 0, 67, 3.5, 0.0, 13.0, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 35, 59, 0, 67, 3.5, 0.0, 19.0, 4.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 35, 59, 0, 67, 3.5, 0.0, 16.0, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 11.0, 35, 59, 0, 67, 3.5, 0.0, 13.0, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 8.5); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 35, 59, 0, 67, 3.5, 0.0, 15.5, 13.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 35, 59, 0, 67, 3.5, 0.0, 12.5, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 11.0, 35, 59, 0, 67, 3.5, 0.0, 12.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 35, 59, 0, 67, 3.5, 0.0, 15.5, 13.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 35, 59, 0, 67, 3.5, 0.0, 12.5, 12.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 11.0, 35, 59, 0, 67, 3.5, 0.0, 12.0, 8.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 9.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 35, 59, 0, 67, 3.5, 0.0, 9.7, 18.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 35, 59, 0, 67, 3.5, 0.0, 9.0, 12.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 11.0, 35, 59, 0, 67, 3.5, 0.0, 10.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 35, 59, 0, 67, 3.5, 0.0, 9.7, 18.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 35, 59, 0, 67, 3.5, 0.0, 9.0, 12.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 11.0, 35, 59, 0, 67, 3.5, 0.0, 10.0, 9.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 9.5); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("top"), 11.0, 35, 59, 0, 67, 3.5, 0.0, 4.0, 13.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("top"), 11.0, 35, 59, 0, 67, 3.5, 0.0, 6.5, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("top"), 11.0, 35, 59, 0, 67, 3.5, 0.0, 9.0, 7.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 11.0, 35, 59, 0, 67, 3.5, 0.0, 4.0, 13.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("top"), 11.0, 35, 59, 0, 67, 3.5, 0.0, 6.5, 8.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("top"), 11.0, 35, 59, 0, 67, 3.5, 0.0, 9.0, 7.5, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 10.0); - FT_MOTION_RATE(fighter, 17.0/(33.0-13.0)); - if is_excute(fighter) { + FT_MOTION_RATE(agent, 17.0/(33.0-13.0)); + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn reflet_attack_s3_s_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attacks3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword"), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y), AttackDirectionAxis(*ATTACK_DIRECTION_X)); ItemModule::set_have_item_visibility(boma, false, 0); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 6.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 8.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } } -unsafe extern "C" fn reflet_attack_hi3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 5.0, 6.0); + FT_MOTION_RATE_RANGE(agent, 1.0, 5.0, 6.0); frame(lua_state, 5.0); - FT_MOTION_RATE(fighter, 1.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("sword"), 9.5, 110, 60, 0, 66, 3.5, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 9.5, 110, 60, 0, 66, 3.5, 0.0, 1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("armr"), 9.5, 110, 60, 0, 66, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + FT_MOTION_RATE(agent, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("sword"), 9.5, 110, 60, 0, 66, 3.5, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 9.5, 110, 60, 0, 66, 3.5, 0.0, 1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("armr"), 9.5, 110, 60, 0, 66, 3.5, -1.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); } frame(lua_state, 15.0); - if is_excute(fighter) { + if is_excute(agent) { AttackModule::clear_all(boma); } } -unsafe extern "C" fn reflet_attack_hi3_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attackhi3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword"), AttackDirectionAxis(*ATTACK_DIRECTION_Z_MINUS), AttackDirectionAxis(*ATTACK_DIRECTION_Y), AttackDirectionAxis(*ATTACK_DIRECTION_X)); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR); } frame(lua_state, 3.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 5.0); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } frame(lua_state, 23.0); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_lands"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } } -unsafe extern "C" fn reflet_attack_lw3_game(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); +unsafe extern "C" fn game_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); frame(lua_state, 1.0); - FT_MOTION_RATE_RANGE(fighter, 1.0, 7.0, 4.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 1.0, 7.0, 4.0); + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 3.5, 4.0); } frame(lua_state, 4.0); - if is_excute(fighter) { + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 0.0, 5.0); } frame(lua_state, 7.0); - FT_MOTION_RATE_RANGE(fighter, 7.0, 8.0, 3.0); - if is_excute(fighter) { - ATTACK(fighter, 0, 0, Hash40::new("armr"), 8.0, 75, 46, 0, 63, 3.5, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 1, 0, Hash40::new("sword"), 8.0, 85, 46, 0, 63, 3.5, 0.0, 1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); - ATTACK(fighter, 2, 0, Hash40::new("sword"), 8.0, 85, 46, 0, 63, 3.5, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + FT_MOTION_RATE_RANGE(agent, 7.0, 8.0, 3.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("armr"), 8.0, 75, 46, 0, 63, 3.5, -2.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 1, 0, Hash40::new("sword"), 8.0, 85, 46, 0, 63, 3.5, 0.0, 1.5, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); + ATTACK(agent, 2, 0, Hash40::new("sword"), 8.0, 85, 46, 0, 63, 3.5, 0.0, 6.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD); AttackModule::set_attack_height_all(boma, app::AttackHeight(*ATTACK_HEIGHT_LOW), false); } frame(lua_state, 8.0); - FT_MOTION_RATE_RANGE(fighter, 8.0, 22.0, 19.0); - if is_excute(fighter) { + FT_MOTION_RATE_RANGE(agent, 8.0, 22.0, 19.0); + if is_excute(agent) { FighterAreaModuleImpl::enable_fix_jostle_area(boma, 5.0, 5.0); AttackModule::clear_all(boma); } frame(lua_state, 22.0); - FT_MOTION_RATE(fighter, 1.0); + FT_MOTION_RATE(agent, 1.0); } -unsafe extern "C" fn reflet_attack_lw3_expression(fighter: &mut L2CAgentBase) { - let lua_state = fighter.lua_state_agent; - let boma = fighter.boma(); - if is_excute(fighter) { +unsafe extern "C" fn expression_attacklw3(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { AttackModule::set_attack_reference_joint_id(boma, Hash40::new("sword"), AttackDirectionAxis(*ATTACK_DIRECTION_Z), AttackDirectionAxis(*ATTACK_DIRECTION_Y), AttackDirectionAxis(*ATTACK_DIRECTION_X)); - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 4); + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 4); } frame(lua_state, 4.5); - if is_excute(fighter) { + if is_excute(agent) { ControlModule::set_rumble(boma, Hash40::new("rbkind_nohitm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); } frame(lua_state, 6.5); - if is_excute(fighter) { - RUMBLE_HIT(fighter, Hash40::new("rbkind_slashm"), 0); + if is_excute(agent) { + RUMBLE_HIT(agent, Hash40::new("rbkind_slashm"), 0); } frame(lua_state, 33.0); - if is_excute(fighter) { - slope!(fighter, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 10); + if is_excute(agent) { + slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 10); } } -pub fn install() { - smashline::Agent::new("reflet") - .acmd("game_attacks3", reflet_attack_s3_s_game) - .acmd("expression_attacks3", reflet_attack_s3_s_expression) - .acmd("game_attackhi3", reflet_attack_hi3_game) - .acmd("expression_attackhi3", reflet_attack_hi3_expression) - .acmd("game_attacklw3", reflet_attack_lw3_game) - .acmd("expression_attacklw3", reflet_attack_lw3_expression) - .install(); +pub fn install(agent: &mut Agent) { + agent.acmd("game_attacks3", game_attacks3); + agent.acmd("expression_attacks3", expression_attacks3); + agent.acmd("game_attackhi3", game_attackhi3); + agent.acmd("expression_attackhi3", expression_attackhi3); + agent.acmd("game_attacklw3", game_attacklw3); + agent.acmd("expression_attacklw3", expression_attacklw3); } diff --git a/fighters/reflet/src/elwind/acmd.rs b/fighters/reflet/src/elwind/acmd.rs new file mode 100644 index 0000000000..0f1919d170 --- /dev/null +++ b/fighters/reflet/src/elwind/acmd.rs @@ -0,0 +1,7 @@ +use super::*; + +mod special; + +pub fn install(agent: &mut Agent) { + special::install(agent); +} \ No newline at end of file diff --git a/fighters/reflet/src/elwind/acmd/special.rs b/fighters/reflet/src/elwind/acmd/special.rs new file mode 100644 index 0000000000..35e2ecae77 --- /dev/null +++ b/fighters/reflet/src/elwind/acmd/special.rs @@ -0,0 +1,30 @@ +use super::*; +unsafe extern "C" fn game_shoot0(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + GroundModule::modify_rhombus(boma, 0.0, 1.0, 1.0); + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 80, 30, 0, 100, 6.0, 0.0, 2.0, 0.5, Some(0.0), Some(-3.5), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + } + wait(lua_state, 4.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.0, 80, 30, 0, 100, 7.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_MAGIC); + } +} +unsafe extern "C" fn game_landing(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 0.0, 361, 100, 55, 0, 10.0, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, true, true, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_normal"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_NONE, *ATTACK_REGION_NONE); + AttackModule::clear(boma, 1, false); + } + frame(lua_state, 5.0); + if is_excute(agent) { + notify_event_msc_cmd!(agent, Hash40::new_raw(0x199c462b5d)); + } +} + +pub fn install(agent: &mut Agent) { + agent.acmd("game_shoot0", game_shoot0); + agent.acmd("game_landing", game_landing); +} diff --git a/fighters/reflet/src/elwind/mod.rs b/fighters/reflet/src/elwind/mod.rs new file mode 100644 index 0000000000..a913d87998 --- /dev/null +++ b/fighters/reflet/src/elwind/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("reflet_elwind"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/reflet/src/gigafire/acmd.rs b/fighters/reflet/src/gigafire/acmd.rs new file mode 100644 index 0000000000..0f1919d170 --- /dev/null +++ b/fighters/reflet/src/gigafire/acmd.rs @@ -0,0 +1,7 @@ +use super::*; + +mod special; + +pub fn install(agent: &mut Agent) { + special::install(agent); +} \ No newline at end of file diff --git a/fighters/reflet/src/gigafire/acmd/special.rs b/fighters/reflet/src/gigafire/acmd/special.rs new file mode 100644 index 0000000000..5dc5f3fa27 --- /dev/null +++ b/fighters/reflet/src/gigafire/acmd/special.rs @@ -0,0 +1,41 @@ +use super::*; +unsafe extern "C" fn game_burn(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + AREA_WIND_2ND_RAD_arg9(agent, 0, 1, 0.05, 200, 0.8, 0, 9, 15, 60); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.3, 120, 100, 15, 0, 3.8, 0.0, 8.0, 0.0, Some(0.0), Some(1.0), Some(0.0), 0.5, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -0.5, 0.0, 8, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); + } + wait(lua_state, 10.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.3, 115, 100, 15, 0, 4.0, 0.0, 9.0, 0.0, Some(0.0), Some(1.0), Some(0.0), 0.5, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -0.5, 0.0, 8, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); + } + wait(lua_state, 10.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.3, 110, 100, 15, 0, 4.0, 0.0, 9.0, 0.0, Some(0.0), Some(1.0), Some(0.0), 0.5, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -0.5, 0.0, 8, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); + } +} +unsafe extern "C" fn game_rise(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + QUAKE(agent, *CAMERA_QUAKE_KIND_S); + AREA_WIND_2ND_RAD_arg9(agent, 0, 1, 0.05, 200, 1, 0, 5, 12, 60); + ATTACK(agent, 0, 0, Hash40::new("top"), 1.3, 96, 100, 15, 0, 3.4, 0.0, 7.0, 0.0, Some(0.0), Some(1.0), Some(0.0), 0.5, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -0.5, 0.0, 4, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); + } + wait(lua_state, 10.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 1.3, 96, 100, 15, 0, 3.6, 0.0, 7.0, 0.0, Some(0.0), Some(1.0), Some(0.0), 0.5, 0.8, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, -0.5, 0.0, 4, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_fire"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_FIRE, *ATTACK_REGION_MAGIC); + } +} +unsafe extern "C" fn effect_rise(agent: &mut L2CAgentBase) { + if is_excute(agent) { + EFFECT_FOLLOW(agent, Hash40::new("reflet_gigafire_firepillar"), Hash40::new("top"), -0.0, 0, 0, 0, 0, 0, 1, true); + LAST_EFFECT_SET_RATE(agent, 1.45); + } +} +pub fn install(agent: &mut Agent) { + agent.acmd("game_burn", game_burn); + agent.acmd("game_rise", game_rise); + agent.acmd("effect_rise", effect_rise); +} diff --git a/fighters/reflet/src/gigafire/mod.rs b/fighters/reflet/src/gigafire/mod.rs new file mode 100644 index 0000000000..336fda9e89 --- /dev/null +++ b/fighters/reflet/src/gigafire/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("reflet_gigafire"); + acmd::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/reflet/src/lib.rs b/fighters/reflet/src/lib.rs index 1ad1fd8b2b..2c38acffe5 100644 --- a/fighters/reflet/src/lib.rs +++ b/fighters/reflet/src/lib.rs @@ -38,7 +38,9 @@ use utils::{ use smashline::*; pub fn install() { - acmd::install(); - status::install(); - opff::install(); -} + let agent = &mut Agent::new("reflet"); + acmd::install(agent); + status::install(agent); + opff::install(agent); + agent.install(); +} \ No newline at end of file diff --git a/fighters/reflet/src/opff.rs b/fighters/reflet/src/opff.rs index ac0320ba4c..19729fa05b 100644 --- a/fighters/reflet/src/opff.rs +++ b/fighters/reflet/src/opff.rs @@ -136,8 +136,7 @@ pub unsafe fn reflet_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) { moveset(fighter, &mut *info.boma, info.id, info.cat, info.status_kind, info.situation_kind, info.motion_kind.hash, info.stick_x, info.stick_y, info.facing, info.frame); } } -pub fn install() { - smashline::Agent::new("reflet") - .on_line(Main, reflet_frame_wrapper) - .install(); +pub fn install(agent: &mut Agent) { + agent.on_line(Main, reflet_frame_wrapper) + } diff --git a/fighters/reflet/src/status.rs b/fighters/reflet/src/status.rs index d8583fe0c2..9a84243059 100644 --- a/fighters/reflet/src/status.rs +++ b/fighters/reflet/src/status.rs @@ -33,12 +33,12 @@ unsafe extern "C" fn reflet_on_start(fighter: &mut L2CFighterCommon) { VarModule::set_int(fighter.battle_object, vars::common::instance::FLOAT_STATUS_KIND, statuses::reflet::FLOAT); } -pub fn install() { - attack_air::install(); +pub fn install(agent: &mut Agent) { + attack_air::install(agent); - special_n::install(); + special_n::install(agent); - float::install(); + float::install(agent); - Agent::new("reflet").on_start(reflet_on_start).install(); + agent.on_start(reflet_on_start); } diff --git a/fighters/reflet/src/status/attack_air.rs b/fighters/reflet/src/status/attack_air.rs index 837ceb9120..b2b0b6d2e9 100644 --- a/fighters/reflet/src/status/attack_air.rs +++ b/fighters/reflet/src/status/attack_air.rs @@ -25,10 +25,8 @@ unsafe extern "C" fn reflet_attack_air_main(fighter: &mut L2CFighterCommon) -> L attack_air_float_main(fighter, statuses::reflet::FLOAT.into()) } -pub fn install() { - smashline::Agent::new("reflet") - .status(Pre, *FIGHTER_STATUS_KIND_ATTACK_AIR, reflet_attack_air_pre) - .status(Init, *FIGHTER_STATUS_KIND_ATTACK_AIR, init_attack_air) - .status(Main, *FIGHTER_STATUS_KIND_ATTACK_AIR, reflet_attack_air_main) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, *FIGHTER_STATUS_KIND_ATTACK_AIR, reflet_attack_air_pre); + agent.status(Init, *FIGHTER_STATUS_KIND_ATTACK_AIR, init_attack_air); + agent.status(Main, *FIGHTER_STATUS_KIND_ATTACK_AIR, reflet_attack_air_main); } diff --git a/fighters/reflet/src/status/float.rs b/fighters/reflet/src/status/float.rs index 1013e2930f..dbe7967e71 100644 --- a/fighters/reflet/src/status/float.rs +++ b/fighters/reflet/src/status/float.rs @@ -222,10 +222,8 @@ unsafe extern "C" fn float_end(fighter: &mut L2CFighterCommon) -> L2CValue { float_end_common(fighter) } -pub fn install() { - smashline::Agent::new("reflet") - .status(Pre, statuses::reflet::FLOAT, float_pre) - .status(Main, statuses::reflet::FLOAT, float_main) - .status(End, statuses::reflet::FLOAT, float_end) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Pre, statuses::reflet::FLOAT, float_pre); + agent.status(Main, statuses::reflet::FLOAT, float_main); + agent.status(End, statuses::reflet::FLOAT, float_end); } diff --git a/fighters/reflet/src/status/special_n.rs b/fighters/reflet/src/status/special_n.rs index 9538415d0b..ea437ed256 100644 --- a/fighters/reflet/src/status/special_n.rs +++ b/fighters/reflet/src/status/special_n.rs @@ -6,8 +6,6 @@ pub unsafe extern "C" fn init_special_n(fighter: &mut L2CFighterCommon) -> L2CVa smashline::original_status(Init, fighter, *FIGHTER_STATUS_KIND_SPECIAL_N)(fighter) } -pub fn install() { - smashline::Agent::new("reflet") - .status(Init, *FIGHTER_STATUS_KIND_SPECIAL_N, init_special_n) - .install(); +pub fn install(agent: &mut Agent) { + agent.status(Init, *FIGHTER_STATUS_KIND_SPECIAL_N, init_special_n); } diff --git a/fighters/reflet/src/thunder/acmd.rs b/fighters/reflet/src/thunder/acmd.rs new file mode 100644 index 0000000000..0f1919d170 --- /dev/null +++ b/fighters/reflet/src/thunder/acmd.rs @@ -0,0 +1,7 @@ +use super::*; + +mod special; + +pub fn install(agent: &mut Agent) { + special::install(agent); +} \ No newline at end of file diff --git a/fighters/reflet/src/thunder/acmd/special.rs b/fighters/reflet/src/thunder/acmd/special.rs new file mode 100644 index 0000000000..04f7a25a61 --- /dev/null +++ b/fighters/reflet/src/thunder/acmd/special.rs @@ -0,0 +1,54 @@ +use super::*; +unsafe extern "C" fn game_shoot2(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_nohits"),0, false, *BATTLE_OBJECT_ID_INVALID as u32); + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 70, 35, 0, 50, 3.2, 0.0, 0.0, 0.0, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); + AttackModule::enable_safe_pos(boma); + } + frame(lua_state, 1.0); + if is_excute(agent) { + ATTACK(agent, 0, 0, Hash40::new("top"), 6.0, 70, 35, 0, 50, 3.2, 0.0, -0.7, 0.0, Some(0.0), Some(0.7), Some(0.0), 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); + } +} +unsafe extern "C" fn game_gigaspark(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let boma = agent.boma(); + if is_excute(agent) { + ControlModule::set_rumble(agent.module_accessor, Hash40::new("rbkind_explosionm"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32); + ATTACK(agent, 0, 0, Hash40::new("top"), 2.4, 110, 100, 20, 0, 6.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 0.2, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, true, true, false, false, false, *COLLISION_SITUATION_MASK_G, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 0, Hash40::new("top"), 2.4, 366, 100, 16, 0, 2.0, 0.0, 12.0, 12.0, Some(0.0), Some(-12.0), Some(-12.0), 0.2, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 2, 0, Hash40::new("top"), 2.4, 366, 100, 16, 0, 2.0, 0.0, 12.0, -12.0, Some(0.0), Some(-12.0), Some(12.0), 0.2, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); + } + frame(lua_state, 24.0); + if is_excute(agent) { + ATTACK(agent, 0, 1, Hash40::new("top"), 3.0, 50, 166, 0, 75, 3.0, 0.0, 12.0, 12.0, Some(0.0), Some(-12.0), Some(-12.0), 0.6, 1.0,*ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); + ATTACK(agent, 1, 1, Hash40::new("top"), 3.0, 50, 166, 0, 75, 3.0, 0.0, 12.0, -12.0, Some(0.0), Some(-12.0), Some(12.0), 0.6, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 5, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); + } + frame(lua_state, 25.0); + if is_excute(agent) { + AttackModule::clear_all(boma); + } +} +unsafe extern "C" fn game_tron0(agent: &mut L2CAgentBase) { + let lua_state = agent.lua_state_agent; + let reflet_boma = &mut *sv_battle_object::module_accessor((WorkModule::get_int(agent.boma(), *WEAPON_INSTANCE_WORK_ID_INT_LINK_OWNER)) as u32); + let charge = VarModule::get_int(reflet_boma.object(), vars::reflet::instance::THUNDER_CHARGE); + //let damage = (1 + (charge-1)*9/14) as f32; + let damage = 1.5 + (charge/2) as f32; + if is_excute(agent) { + if charge > 0 && charge <= 8 { + ATTACK(agent, 0, 0, Hash40::new("top"), damage, 45, 145, 0, 75, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, -0.5, 0.0, 4, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); + + } else { + ATTACK(agent, 0, 0, Hash40::new("top"), 5.5, 45, 145, 0, 75, 3.0, 0.0, 0.0, 0.0, Some(0.0), Some(0.0), Some(0.0), 1.0, 0.5, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_F, false, 0, 0.0, 4, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_ELEC, *ATTACK_REGION_MAGIC); + } + AttackModule::set_no_finish_camera(agent.boma(), 0, true, false); + } +} +pub fn install(agent: &mut Agent) { + agent.acmd("game_shoot2", game_shoot2); + agent.acmd("game_gigaspark", game_gigaspark); + agent.acmd("game_tron0", game_tron0); +} diff --git a/fighters/reflet/src/thunder/mod.rs b/fighters/reflet/src/thunder/mod.rs new file mode 100644 index 0000000000..a65c112871 --- /dev/null +++ b/fighters/reflet/src/thunder/mod.rs @@ -0,0 +1,9 @@ +use super::*; + +mod acmd; + +pub fn install() { + let agent = &mut Agent::new("reflet_gigafire"); + acmd::install(agent); + agent.install(); +}