Skip to content

Commit

Permalink
Merge branch 'pre-release' of https://github.com/HDR-Development/HewD…
Browse files Browse the repository at this point in the history
…raw-Remix into pre-release
  • Loading branch information
WuBoytH committed Nov 15, 2024
2 parents caa0e49 + faf7709 commit f2ad62b
Show file tree
Hide file tree
Showing 12 changed files with 695 additions and 180 deletions.
117 changes: 84 additions & 33 deletions fighters/chrom/src/acmd/specials/special_n.rs

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions fighters/kirby/src/acmd/copy.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use super::*;

mod chrom;
mod daisy;
mod diddy;
mod edge;
Expand All @@ -21,9 +22,11 @@ mod ridley;
mod roy;
mod shizue;
mod sonic;
mod trail;
mod wolf;

pub fn install(agent: &mut Agent) {
chrom::install(agent);
daisy::install(agent);
diddy::install(agent);
edge::install(agent);
Expand All @@ -45,5 +48,6 @@ pub fn install(agent: &mut Agent) {
roy::install(agent);
shizue::install(agent);
sonic::install(agent);
trail::install(agent);
wolf::install(agent);
}
92 changes: 92 additions & 0 deletions fighters/kirby/src/acmd/copy/chrom.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
use super::*;

unsafe extern "C" fn effect_chromspecialnend(agent: &mut L2CAgentBase) {
let lua_state = agent.lua_state_agent;
let boma = agent.boma();
if is_excute(agent) {
EFFECT_OFF_KIND(agent, Hash40::new("chrom_volcano_hold_1"), false, false);
EFFECT_OFF_KIND(agent, Hash40::new("chrom_volcano_hold_2"), false, false);
EFFECT_FOLLOW(agent, Hash40::new("chrom_sword_purple"), Hash40::new("havel"), 0, 1.25, 0, -90, 90, 0, 1, true);
}
//frame(lua_state, 3.0);
//if is_excute(agent) {
//AFTER_IMAGE4_ON_arg29(agent, Hash40::new("tex_chrom_sword1"), Hash40::new("tex_chrom_sword2"), 8, Hash40::new("sword1"), 0.0, 0.0, 1.65, Hash40::new("sword1"), -0.0, -0.0, 12.4, false, Hash40::new("chrom_sword"), Hash40::new("sword1"), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0, *EFFECT_AXIS_X, 0, *TRAIL_BLEND_ALPHA, 101, *TRAIL_CULL_NONE, 1.2, 0.2);
//}
frame(lua_state, 12.0);
if is_excute(agent) {
LANDING_EFFECT(agent, Hash40::new("null"), Hash40::new("top"), 17, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, false);
}
frame(lua_state, 13.0);
if is_excute(agent) {
AFTER_IMAGE_OFF(agent, 6);
if agent.is_situation(*SITUATION_KIND_GROUND) {
LANDING_EFFECT(agent, Hash40::new("sys_h_smoke_b"), Hash40::new("top"), 0, 0, 0, 0, 0, 0, 0.6, 0, 0, 0, 0, 0, 0, false);
}
}
frame(lua_state, 38.0);
if is_excute(agent) {
COL_NORMAL(agent);
EFFECT_OFF_KIND(agent, Hash40::new("chrom_sword_purple"), false, false);
}
}

unsafe extern "C" fn expression_chromspecialnend(agent: &mut L2CAgentBase) {
let lua_state = agent.lua_state_agent;
let boma = agent.boma();
if is_excute(agent) {
slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR);
//AREA_WIND_2ND_arg10(agent, 0, 2, 110, 300, 0.6, 0, 12, 30, 30, 40);
}
frame(lua_state, 9.0);
if is_excute(agent) {
slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 5);
RUMBLE_HIT(agent, Hash40::new("rbkind_explosion"), 0);
ControlModule::set_rumble(boma, Hash40::new("rbkind_explosion"), 0, false, 0);
}
frame(lua_state, 11.0);
if is_excute(agent) {
//QUAKE(agent, *CAMERA_QUAKE_KIND_M);
}
frame(lua_state, 23.0);
if is_excute(agent) {
AreaModule::erase_wind(boma, 0);
}
frame(lua_state, 34.0);
if is_excute(agent) {
slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 8);
}
}

unsafe extern "C" fn expression_chromspecialairnend(agent: &mut L2CAgentBase) {
let lua_state = agent.lua_state_agent;
let boma = agent.boma();
if is_excute(agent) {
slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR);
//AREA_WIND_2ND_arg10(agent, 0, 2, 110, 300, 0.6, 0, 12, 30, 30, 40);
}
frame(lua_state, 9.0);
if is_excute(agent) {
slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_TOP, 5);
RUMBLE_HIT(agent, Hash40::new("rbkind_explosion"), 0);
ControlModule::set_rumble(boma, Hash40::new("rbkind_explosion"), 0, false, 0);
}
frame(lua_state, 11.0);
if is_excute(agent) {
//QUAKE(agent, *CAMERA_QUAKE_KIND_M);
}
frame(lua_state, 23.0);
if is_excute(agent) {
AreaModule::erase_wind(boma, 0);
}
frame(lua_state, 34.0);
if is_excute(agent) {
slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE_INTP, *SLOPE_STATUS_LR, 8);
}
}

pub fn install(agent: &mut Agent) {
agent.acmd("effect_chromspecialnend", effect_chromspecialnend, Priority::Low);
agent.acmd("effect_chromspecialairnend", effect_chromspecialnend, Priority::Low);
agent.acmd("expression_chromspecialnend", expression_chromspecialnend, Priority::Low);
agent.acmd("expression_chromspecialairnend", expression_chromspecialairnend, Priority::Low);
}
148 changes: 148 additions & 0 deletions fighters/kirby/src/acmd/copy/trail.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
use super::*;

unsafe extern "C" fn game_trailspecialn2(agent: &mut L2CAgentBase) {
let lua_state = agent.lua_state_agent;
let boma = agent.boma();
if is_excute(agent) {
WorkModule::on_flag(boma, *FIGHTER_TRAIL_INSTANCE_WORK_ID_FLAG_MAGIC_SELECT_FORBID);
ArticleModule::remove_exist(boma, *FIGHTER_TRAIL_GENERATE_ARTICLE_FLOWER, app::ArticleOperationTarget(0));
ArticleModule::generate_article(boma, *FIGHTER_TRAIL_GENERATE_ARTICLE_FLOWER, false, 0);
ArticleModule::change_motion(boma, *FIGHTER_TRAIL_GENERATE_ARTICLE_FLOWER, Hash40::new("special_n2"), false, 0.0);
}
frame(lua_state, 1.0);
FT_MOTION_RATE(agent, 0.7);
frame(lua_state, 10.0);
FT_MOTION_RATE(agent, 1.0);
if is_excute(agent) {
ATTACK(agent, 0, 0, Hash40::new("top"), 4.5, 78, 60, 0, 70, 6.0, 0.0, 6.0, 1.0, Some(0.0), Some(6.0), Some(-1.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_SWORD);
ATTACK(agent, 1, 0, Hash40::new("top"), 4.5, 78, 60, 0, 70, 3.0, 0.0, 6.0, 12.0, Some(0.0), Some(6.0), Some(-12.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_LL, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_SWORD);
}
wait(lua_state, 6.0);
if is_excute(agent) {
AttackModule::clear_all(boma);
}
frame(lua_state, 20.0);
if is_excute(agent) {
ATTACK(agent, 0, 0, Hash40::new("top"), 4.5, 361, 60, 0, 30, 6.0, 0.0, 6.0, 1.0, Some(0.0), Some(6.0), Some(-1.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_SWORD);
ATTACK(agent, 1, 0, Hash40::new("top"), 4.5, 361, 60, 0, 30, 3.0, 0.0, 6.0, 12.0, Some(0.0), Some(6.0), Some(-12.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_SWORD);
}
wait(lua_state, 6.0);
if is_excute(agent) {
AttackModule::clear_all(boma);
}
frame(lua_state, 30.0);
if is_excute(agent) {
ATTACK(agent, 0, 0, Hash40::new("top"), 4.5, 361, 60, 0, 30, 6.0, 0.0, 6.0, 1.0, Some(0.0), Some(6.0), Some(-1.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_SWORD);
ATTACK(agent, 1, 0, Hash40::new("top"), 4.5, 361, 60, 0, 30, 3.0, 0.0, 6.0, 12.0, Some(0.0), Some(6.0), Some(-12.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_SWORD);
}
wait(lua_state, 6.0);
if is_excute(agent) {
AttackModule::clear_all(boma);
}
frame(lua_state, 40.0);
if is_excute(agent) {
ATTACK(agent, 0, 0, Hash40::new("top"), 4.5, 361, 60, 0, 30, 6.0, 0.0, 6.0, 1.0, Some(0.0), Some(6.0), Some(-1.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_SWORD);
ATTACK(agent, 1, 0, Hash40::new("top"), 4.5, 361, 60, 0, 30, 3.0, 0.0, 6.0, 12.0, Some(0.0), Some(6.0), Some(-12.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_SWORD);
KineticModule::change_kinetic(boma, *FIGHTER_KINETIC_TYPE_AIR_STOP);
}
wait(lua_state, 6.0);
if is_excute(agent) {
AttackModule::clear_all(boma);
}
frame(lua_state, 50.0);
if is_excute(agent) {
ATTACK(agent, 0, 0, Hash40::new("top"), 4.5, 361, 60, 0, 30, 6.0, 0.0, 6.0, 1.0, Some(0.0), Some(6.0), Some(-1.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_SWORD);
ATTACK(agent, 1, 0, Hash40::new("top"), 4.5, 361, 60, 0, 30, 3.0, 0.0, 6.0, 12.0, Some(0.0), Some(6.0), Some(-12.0), 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, true, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_FREEZE, *ATTACK_REGION_SWORD);
}
wait(lua_state, 6.0);
if is_excute(agent) {
AttackModule::clear_all(boma);
}
frame(lua_state, 90.0);
if is_excute(agent) {
WorkModule::off_flag(boma, *FIGHTER_TRAIL_INSTANCE_WORK_ID_FLAG_MAGIC_SELECT_FORBID);
WorkModule::on_flag(boma, *FIGHTER_TRAIL_STATUS_SPECIAL_N2_FLAG_CHANGE_MAGIC);
}
}

unsafe extern "C" fn effect_trailspecialn2(agent: &mut L2CAgentBase) {
let lua_state = agent.lua_state_agent;
let boma = agent.boma();
if is_excute(agent) {
EFFECT_FOLLOW(agent, Hash40::new("trail_sword_ice"), Hash40::new("haver"), 0, 0, 0, -90, 0, 0, 1, true);
EFFECT_FOLLOW(agent, Hash40::new("trail_ice_hold"), Hash40::new("haver"), 0, 10, -1, -90, 0, 0, 1, true);
EffectModule::enable_sync_init_pos_last(boma);
EFFECT_FOLLOW(agent, Hash40::new("trail_ice_sword_flare"), Hash40::new("haver"), 0, 10, -1, -90, 0, 0, 1, true);
}
frame(lua_state, 9.0);
if is_excute(agent) {
EFFECT_FOLLOW(agent, Hash40::new("sys_spin_wind"), Hash40::new("sys_spin_wind"), 0, 3.7, 0, 0, 0, 180, 0.9, true);
LAST_EFFECT_SET_RATE(agent, 0.25);
EFFECT_FOLLOW(agent, Hash40::new("sys_spin_wind"), Hash40::new("sys_spin_wind"), 0, 3.7, 0, 0, 180, 180, 0.9, true);
LAST_EFFECT_SET_RATE(agent, 0.25);
}
frame(lua_state, 44.0);
if is_excute(agent) {
EFFECT_DETACH_KIND(agent, Hash40::new("trail_sword_ice"), -1);
EFFECT_OFF_KIND(agent, Hash40::new("trail_sword_ice"), false, true);
}
}

unsafe extern "C" fn sound_trailspecialn2(agent: &mut L2CAgentBase) {
let lua_state = agent.lua_state_agent;
let boma = agent.boma();
frame(lua_state, 1.0);
if is_excute(agent) {
PLAY_SE(agent, Hash40::new("se_trail_special_n_b01"));
}
frame(lua_state, 10.0);
if is_excute(agent) {
PLAY_SE(agent, Hash40::new("vc_kirby_copy_trail_special_n02"));
}
frame(lua_state, 12.0);
if is_excute(agent) {
PLAY_SE(agent, Hash40::new("se_trail_special_n_b02"));
}
}

unsafe extern "C" fn expression_trailspecialn2(agent: &mut L2CAgentBase) {
let lua_state = agent.lua_state_agent;
let boma = agent.boma();
if is_excute(agent) {
ItemModule::set_have_item_visibility(boma, false, 0);
slope!(agent, *MA_MSC_CMD_SLOPE_SLOPE, *SLOPE_STATUS_LR);
}
frame(lua_state, 10.0);
if is_excute(agent) {
ControlModule::set_rumble(boma, Hash40::new("rbkind_81_special_n2"), 0, false, *BATTLE_OBJECT_ID_INVALID as u32);
}
frame(lua_state, 43.0);
if ItemModule::is_have_item(boma, 0) {
if is_excute(agent) {
//FT_MOTION_INTP_WAIT_ITEM(agent, true, 0.05);
}
}
frame(lua_state, 49.0);
if is_excute(agent) {
//FT_MOTION_INTP_WAIT_ITEM(agent, true, 0.08);
}
frame(lua_state, 57.0);
if is_excute(agent) {
ItemModule::set_have_item_visibility(boma, true, 0);
}
frame(lua_state, 58.0);
if is_excute(agent) {
//FT_MOTION_INTP_WAIT_ITEM(agent, true, 0);
}
}

pub fn install(agent: &mut Agent) {
agent.acmd("game_trailspecialn2", game_trailspecialn2, Priority::Low);
agent.acmd("effect_trailspecialn2", effect_trailspecialn2, Priority::Low);
agent.acmd("sound_trailspecialn2", sound_trailspecialn2, Priority::Low);
agent.acmd("expression_trailspecialn2", expression_trailspecialn2, Priority::Low);
agent.acmd("game_trailspecialairn2", game_trailspecialn2, Priority::Low);
agent.acmd("effect_trailspecialairn2", effect_trailspecialn2, Priority::Low);
agent.acmd("sound_trailspecialairn2", sound_trailspecialn2, Priority::Low);
agent.acmd("expression_trailspecialairn2", expression_trailspecialn2, Priority::Low);
}
4 changes: 3 additions & 1 deletion fighters/kirby/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ use smashline::*;
pub const KOOPA_MAX_COOLDOWN : i32 = 900;
pub const LUCAS_CHARGE_TIME : i32 = 120;
static mut BAYONET_EGGS:[i32;8] = [0; 8]; //I have no idea why varmod doesn't work with this, so this will have to do
pub const MAGIC_COOLDOWN_FRAME: i32 = 35; // how many frames sora has to wait between spells

pub fn install() {
let agent = &mut Agent::new("kirby");
Expand All @@ -52,7 +53,8 @@ pub fn install() {

let whitelist_articles = [
(*FIGHTER_KIND_PALUTENA, *WEAPON_KIND_PALUTENA_EXPLOSIVEFLAME),
(*FIGHTER_KIND_PALUTENA, *WEAPON_KIND_PALUTENA_EXPLOSIVEFLAME_RESERVE)
(*FIGHTER_KIND_PALUTENA, *WEAPON_KIND_PALUTENA_EXPLOSIVEFLAME_RESERVE),
(*FIGHTER_KIND_TRAIL, 0x266)
];
for (fighter_id, article_id) in whitelist_articles.iter() {
smashline::whitelist_kirby_copy_article(*fighter_id, *article_id);
Expand Down
4 changes: 2 additions & 2 deletions fighters/kirby/src/opff.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,7 @@ unsafe fn fastfall_specials(fighter: &mut L2CFighterCommon) {
*FIGHTER_KIRBY_STATUS_KIND_SPECIAL_S_FALL,
*FIGHTER_KIRBY_STATUS_KIND_SPECIAL_S_JUMP,
*FIGHTER_KIRBY_STATUS_KIND_SPECIAL_S_ATTACK,
*FIGHTER_KIRBY_STATUS_KIND_TRAIL_SPECIAL_N2,
*FIGHTER_KIRBY_STATUS_KIND_TRAIL_SPECIAL_N3
*FIGHTER_KIRBY_STATUS_KIND_TRAIL_SPECIAL_N3//because for some reason it doesn't work if its in the lua_consts range below
])
|| (0x206..0x377).contains(&copystatus) {
fighter.sub_air_check_dive();
Expand Down Expand Up @@ -143,5 +142,6 @@ pub unsafe fn kirby_frame(fighter: &mut smash::lua2cpp::L2CFighterCommon) {
}

pub fn install(agent: &mut Agent) {
copy::install(agent);
agent.on_line(Main, kirby_frame_wrapper);
}
Loading

0 comments on commit f2ad62b

Please sign in to comment.