Skip to content

Commit 1afb503

Browse files
authored
Merge pull request #2159 from HDR-Development/mega-why-am-i-doing-this-man
Mega Man Adjustments (Again)
2 parents ca09f57 + a88e59b commit 1afb503

File tree

9 files changed

+50
-34
lines changed

9 files changed

+50
-34
lines changed

fighters/rockman/src/acmd/other.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,6 @@ unsafe fn rockman_hardknuckle_regular_game(fighter: &mut L2CAgentBase) {
116116
}
117117
frame(lua_state, 5.0);
118118
if is_excute(fighter) {
119-
AttackModule::clear_all(boma);
120119
sv_kinetic_energy!(
121120
set_speed,
122121
fighter,
@@ -139,6 +138,10 @@ unsafe fn rockman_hardknuckle_regular_game(fighter: &mut L2CAgentBase) {
139138
0.05
140139
);
141140
}
141+
frame(lua_state, 6.0);
142+
if is_excute(fighter) {
143+
AttackModule::clear_all(boma);
144+
}
142145
}
143146

144147
#[acmd_script( agent = "rockman_hardknuckle", script = "effect_regular" , category = ACMD_EFFECT , low_priority)]

fighters/rockman/src/acmd/specials.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -134,12 +134,12 @@ unsafe fn rockman_chargeshot_regular(agent: &mut L2CAgentBase) {
134134
if is_charge_max {
135135
damage = 15.0;
136136
bkb = 40;
137-
kbg = 75;
137+
kbg = 90;
138138
}
139139
else {
140140
damage = 9.0;
141141
bkb = 50;
142-
kbg = 70;
142+
kbg = 85;
143143
}
144144
macros::ATTACK(agent, 0, 0, Hash40::new("top"), damage, 361, kbg, 0, bkb, 2.6, 0.0, 0.0, 0.0, None, None, None, 0.3, 1.0, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_SPEED, false, 0, 0.0, 0, true, true, false, false, false, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_elec"), *ATTACK_SOUND_LEVEL_L, *COLLISION_SOUND_ATTR_KICK, *ATTACK_REGION_ENERGY);
145145
macros::ATK_SET_SHIELD_SETOFF_MUL(agent, 0, 0.32);

fighters/rockman/src/opff.rs

+26-26
Original file line numberDiff line numberDiff line change
@@ -54,31 +54,31 @@ unsafe fn blade_toss_ac(boma: &mut BattleObjectModuleAccessor, status_kind: i32,
5454
}
5555

5656
// upB freefalls after one use per airtime
57-
unsafe fn up_special_freefall(fighter: &mut L2CFighterCommon) {
58-
if StatusModule::is_changing(fighter.module_accessor)
59-
&& (fighter.is_situation(*SITUATION_KIND_GROUND)
60-
|| fighter.is_situation(*SITUATION_KIND_CLIFF)
61-
|| fighter.is_status_one_of(&[*FIGHTER_STATUS_KIND_REBIRTH, *FIGHTER_STATUS_KIND_DEAD, *FIGHTER_STATUS_KIND_LANDING]))
62-
{
63-
VarModule::off_flag(fighter.battle_object, vars::rockman::instance::UP_SPECIAL_FREEFALL);
64-
}
65-
if fighter.is_prev_status(*FIGHTER_ROCKMAN_STATUS_KIND_SPECIAL_HI_JUMP) {
66-
if StatusModule::is_changing(fighter.module_accessor) {
67-
VarModule::on_flag(fighter.battle_object, vars::rockman::instance::UP_SPECIAL_FREEFALL);
68-
}
69-
}
70-
if fighter.is_status(*FIGHTER_ROCKMAN_STATUS_KIND_SPECIAL_HI_JUMP) {
71-
if fighter.is_situation(*SITUATION_KIND_AIR)
72-
&& !StatusModule::is_changing(fighter.module_accessor)
73-
&& VarModule::is_flag(fighter.battle_object, vars::rockman::instance::UP_SPECIAL_FREEFALL) {
74-
if CancelModule::is_enable_cancel(fighter.module_accessor) {
75-
fighter.change_status_req(*FIGHTER_STATUS_KIND_FALL_SPECIAL, true);
76-
let cancel_module = *(fighter.module_accessor as *mut BattleObjectModuleAccessor as *mut u64).add(0x128 / 8) as *const u64;
77-
*(((cancel_module as u64) + 0x1c) as *mut bool) = false; // CancelModule::is_enable_cancel = false
78-
}
79-
}
80-
}
81-
}
57+
// unsafe fn up_special_freefall(fighter: &mut L2CFighterCommon) {
58+
// if StatusModule::is_changing(fighter.module_accessor)
59+
// && (fighter.is_situation(*SITUATION_KIND_GROUND)
60+
// || fighter.is_situation(*SITUATION_KIND_CLIFF)
61+
// || fighter.is_status_one_of(&[*FIGHTER_STATUS_KIND_REBIRTH, *FIGHTER_STATUS_KIND_DEAD, *FIGHTER_STATUS_KIND_LANDING]))
62+
// {
63+
// VarModule::off_flag(fighter.battle_object, vars::rockman::instance::UP_SPECIAL_FREEFALL);
64+
// }
65+
// if fighter.is_prev_status(*FIGHTER_ROCKMAN_STATUS_KIND_SPECIAL_HI_JUMP) {
66+
// if StatusModule::is_changing(fighter.module_accessor) {
67+
// VarModule::on_flag(fighter.battle_object, vars::rockman::instance::UP_SPECIAL_FREEFALL);
68+
// }
69+
// }
70+
// if fighter.is_status(*FIGHTER_ROCKMAN_STATUS_KIND_SPECIAL_HI_JUMP) {
71+
// if fighter.is_situation(*SITUATION_KIND_AIR)
72+
// && !StatusModule::is_changing(fighter.module_accessor)
73+
// && VarModule::is_flag(fighter.battle_object, vars::rockman::instance::UP_SPECIAL_FREEFALL) {
74+
// if CancelModule::is_enable_cancel(fighter.module_accessor) {
75+
// fighter.change_status_req(*FIGHTER_STATUS_KIND_FALL_SPECIAL, true);
76+
// let cancel_module = *(fighter.module_accessor as *mut BattleObjectModuleAccessor as *mut u64).add(0x128 / 8) as *const u64;
77+
// *(((cancel_module as u64) + 0x1c) as *mut bool) = false; // CancelModule::is_enable_cancel = false
78+
// }
79+
// }
80+
// }
81+
// }
8282

8383
unsafe fn fastfall_specials(fighter: &mut L2CFighterCommon) {
8484
if !fighter.is_in_hitlag()
@@ -115,7 +115,7 @@ pub unsafe fn moveset(fighter: &mut L2CFighterCommon, boma: &mut BattleObjectMod
115115
// utilt_command_input(boma, id, status_kind, situation_kind, frame);
116116
// jc_dtilt_hit(boma, status_kind, situation_kind, cat[0], frame);
117117
blade_toss_ac(boma, status_kind, situation_kind, cat[0], frame);
118-
up_special_freefall(fighter);
118+
// up_special_freefall(fighter);
119119
fastfall_specials(fighter);
120120
}
121121

fighters/rockman/src/status/rockbuster/shoot_air.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@ unsafe extern "C" fn rockman_rockbuster_shoot_air_main_loop(fighter: &mut L2CFig
7474
return 1.into();
7575
}
7676
if sit == *SITUATION_KIND_GROUND {
77-
fighter.change_status(FIGHTER_ROCKMAN_STATUS_KIND_ROCKBUSTER_SHOOT_LANDING.into(), false.into());
77+
// fighter.change_status(FIGHTER_ROCKMAN_STATUS_KIND_ROCKBUSTER_SHOOT_LANDING.into(), false.into());
78+
fighter.change_status(FIGHTER_STATUS_KIND_LANDING.into(), false.into());
7879
return 1.into();
7980
}
8081
0.into()

fighters/rockman/src/status/rockbuster/shoot_jump.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ unsafe extern "C" fn rockman_rockbuster_shoot_jump_main_loop(fighter: &mut L2CFi
5757
return 1.into();
5858
}
5959
if sit == *SITUATION_KIND_GROUND {
60-
fighter.change_status(FIGHTER_ROCKMAN_STATUS_KIND_ROCKBUSTER_SHOOT_LANDING.into(), false.into());
60+
// fighter.change_status(FIGHTER_ROCKMAN_STATUS_KIND_ROCKBUSTER_SHOOT_LANDING.into(), false.into());
61+
fighter.change_status(FIGHTER_STATUS_KIND_LANDING.into(), false.into());
6162
return 1.into();
6263
}
6364
0.into()

fighters/rockman/src/status/special_n.rs

+6
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,12 @@ unsafe fn rockman_special_n_main(fighter: &mut L2CFighterCommon) -> L2CValue {
6161

6262
unsafe extern "C" fn rockman_special_n_main_loop(fighter: &mut L2CFighterCommon) -> L2CValue {
6363
let sit = fighter.global_table[SITUATION_KIND].get_i32();
64+
if StatusModule::is_situation_changed(fighter.module_accessor) {
65+
if fighter.global_table[SITUATION_KIND].get_i32() == *SITUATION_KIND_GROUND {
66+
fighter.change_status(FIGHTER_STATUS_KIND_LANDING.into(), false.into());
67+
return 0.into();
68+
}
69+
}
6470
if StatusModule::is_changing(fighter.module_accessor) || StatusModule::is_situation_changed(fighter.module_accessor) {
6571
rockman_special_motion_helper(
6672
fighter,

fighters/rockman/src/vtable_hook.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -207,14 +207,14 @@ unsafe fn rockman_do_leafshield_things_enable(ctx: &mut skyline::hooks::InlineCt
207207
FighterSpecializer_Rockman::set_leafshield(module_accessor, true);
208208
}
209209

210-
const LEAFSHIELD_DISABLE_GROUPS: [WorkId; 5] = [
210+
const LEAFSHIELD_DISABLE_GROUPS: [WorkId; 6] = [
211211
// transition_groups::CHECK_GROUND_SPECIAL,
212212
// transition_groups::CHECK_AIR_SPECIAL,
213213
transition_groups::CHECK_GROUND_ESCAPE,
214214
// transition_groups::CHECK_AIR_ESCAPE,
215215
transition_groups::CHECK_GROUND_GUARD,
216216
transition_groups::CHECK_GROUND_ATTACK,
217-
// transition_groups::CHECK_GROUND_CATCH,
217+
transition_groups::CHECK_GROUND_CATCH,
218218
transition_groups::CHECK_AIR_ATTACK,
219219
transition_groups::CHECK_AIR_CLIFF
220220
];

romfs/source/fighter/rockman/motion/body/motion_patch.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ attack_12:
252252
extra:
253253
xlu_start: 0
254254
xlu_end: 0
255-
cancel_frame: 28
255+
cancel_frame: 24
256256
no_stop_intp: false
257257
attack_13:
258258
game_script: game_attack13

romfs/source/fighter/rockman/param/vl.prcxml

+5
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@
2727
<float hash="limit_speed">0.75</float>
2828
</struct>
2929
</list>
30+
<list hash="param_hardknuckle">
31+
<struct index="0">
32+
<float hash="speed">4.9</float>
33+
</struct>
34+
</list>
3035
<list hash="param_metalblade_other">
3136
<struct index="0">
3237
<float hash="stick_percent">100</float>

0 commit comments

Comments
 (0)