Skip to content

Commit 61937f6

Browse files
authored
Merge branch 'HDR-Development:dev' into mewtwo-tp-jump
2 parents 4319aeb + f503797 commit 61937f6

File tree

12 files changed

+100
-82
lines changed

12 files changed

+100
-82
lines changed

dynamic/src/consts.rs

+1
Original file line numberDiff line numberDiff line change
@@ -909,6 +909,7 @@ pub mod vars {
909909
pub mod instance {
910910
// flags
911911
pub const SPECIAL_HI_CANCEL_ESCAPE_AIR: i32 = 0x0100;
912+
pub const SPECIAL_S_PIKMIN_DETONATE_IS_DETACH_FOR_DETONATE: i32 = 0x0101;
912913
}
913914
pub mod status {
914915
// flags

fighters/common/src/function_hooks/attack.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ unsafe fn get_damage_frame_mul(ctx: &mut skyline::hooks::InlineCtx) {
6363
}
6464
}
6565

66-
#[skyline::hook(offset = 0x406bd4, inline)]
66+
#[skyline::hook(offset = 0x406bf4, inline)]
6767
unsafe fn get_hitstop_frame_add(ctx: &mut skyline::hooks::InlineCtx) {
6868
match utils::game_modes::get_custom_mode() {
6969
Some(modes) => {

fighters/common/src/function_hooks/fighterspecializer/jack.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use super::*;
33
#[skyline::from_offset(0xb2f820)]
44
extern "C" fn jack_customizer(module_accessor: *mut BattleObjectModuleAccessor, customize_to: u32);
55

6-
#[skyline::hook(offset = 0xb30934, inline)]
6+
#[skyline::hook(offset = 0xb30954, inline)]
77
unsafe fn check_doyle_summon_dispatch_hook(ctx: &mut skyline::hooks::InlineCtx) {
88
let module_accessor = *ctx.registers[21].x.as_ref() as *mut BattleObjectModuleAccessor;
99
WorkModule::off_flag(module_accessor, *FIGHTER_JACK_INSTANCE_WORK_ID_FLAG_DOYLE_EXIST);

fighters/common/src/function_hooks/get_param.rs

+19-22
Original file line numberDiff line numberDiff line change
@@ -16,30 +16,27 @@ pub fn install() {
1616
//skyline::nro::add_hook(item_nro_hook);
1717
}
1818

19-
static INT_OFFSET: usize = 0x4e5380; // 12.0.0
20-
static FLOAT_OFFSET: usize = 0x4e53C0; // 12.0.0
2119

20+
// #[skyline::hook(offset=0x720540)]
21+
// unsafe fn get_offset(arg0: u64, arg1: u64) {
22+
// static mut ONCE: bool = true;
23+
// if ONCE {
24+
// ONCE = false;
25+
// //debug::dump_trace();
26+
// }
27+
// original!()(arg0, arg1);
28+
// }
2229

23-
#[skyline::hook(offset=0x720540)]
24-
unsafe fn get_offset(arg0: u64, arg1: u64) {
25-
static mut ONCE: bool = true;
26-
if ONCE {
27-
ONCE = false;
28-
//debug::dump_trace();
29-
}
30-
original!()(arg0, arg1);
31-
}
32-
33-
#[skyline::hook(offset=0x1f8810c, inline)]
34-
unsafe fn get_inline_offset(ctx: &InlineCtx) {
35-
static mut ONCE: bool = true;
36-
if ONCE {
37-
ONCE = false;
38-
println!("{:#x}", ctx.registers[3].x.as_ref() - getRegionAddress(Region::Text) as u64);
39-
}
40-
}
30+
// #[skyline::hook(offset=0x1f8810c, inline)]
31+
// unsafe fn get_inline_offset(ctx: &InlineCtx) {
32+
// static mut ONCE: bool = true;
33+
// if ONCE {
34+
// ONCE = false;
35+
// println!("{:#x}", ctx.registers[3].x.as_ref() - getRegionAddress(Region::Text) as u64);
36+
// }
37+
// }
4138

42-
#[skyline::hook(offset=INT_OFFSET)]
39+
#[skyline::hook(offset=0x4E53A0)]
4340
pub unsafe fn get_param_int_hook(x0: u64, x1: u64, x2 :u64) -> i32 {
4441
let mut boma = *((x0 as *mut u64).offset(1)) as *mut BattleObjectModuleAccessor;
4542
let boma_reference = &mut *boma;
@@ -122,7 +119,7 @@ pub unsafe fn get_param_int_hook(x0: u64, x1: u64, x2 :u64) -> i32 {
122119
original!()(x0, x1, x2)
123120
}
124121

125-
#[skyline::hook(offset=FLOAT_OFFSET)]
122+
#[skyline::hook(offset=0x4E53E0)]
126123
pub unsafe fn get_param_float_hook(x0 /*boma*/: u64, x1 /*param_type*/: u64, x2 /*param_hash*/: u64) -> f32 {
127124
let mut boma = *((x0 as *mut u64).offset(1)) as *mut BattleObjectModuleAccessor;
128125
let boma_reference = &mut *boma;

fighters/common/src/function_hooks/hitstun.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
#[skyline::hook(offset=0x6a70e0)]
2+
#[skyline::hook(offset=0x6a7100)] // unadjusted for 13.0.2?
33
pub fn stub_kill_screen() {}
44

55
pub fn install() {

fighters/common/src/function_hooks/shotos.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ pub fn install() {
66
disable_negative_edge,
77
// enable_terry_inputs_for_shotos
88
);
9-
skyline::patching::Patch::in_text(0x10d45a4).data(0x14000014u32); // enables terry's command inputs for shotos
9+
skyline::patching::Patch::in_text(0x10D45C4).data(0x14000014u32); // enables terry's command inputs for shotos
1010
}
1111

1212
// disables negative edge check for both shotos

fighters/common/src/function_hooks/stage_hazards.rs

+20-17
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ extern "C" {
1010

1111
#[skyline::hook(offset = 0x30F6DE0)]
1212
unsafe fn stub(arg: u64) {
13-
if get_stage_id() == 0x8f && get_current_stage_alt() == 0 {
13+
// if get_stage_id() == 0x8f && get_current_stage_alt() == 0 {
1414
return;
15-
} else {
16-
call_original!(arg);
17-
}
15+
// } else {
16+
// call_original!(arg);
17+
// }
1818
}
1919

2020
#[skyline::hook(offset = 0x5209c0)]
@@ -23,9 +23,10 @@ unsafe fn area_manager_process(manager: *const u64) {
2323
let end = *manager.add(2);
2424
while start != end {
2525
let current = *(start as *const u64);
26-
if *(current as *mut u8).add(0x20) == 0x1b
27-
&& (get_stage_id() == 0x8f && get_current_stage_alt() == 0)
28-
{
26+
// if *(current as *mut u8).add(0x20) == 0x1b
27+
// && (get_stage_id() == 0x8f && get_current_stage_alt() == 0)
28+
// {
29+
if *(current as *mut u8).add(0x20) == 0x1b && get_stage_id() == 0x8f {
2930
*(current as *mut bool).add(0x21) = false;
3031
*((current + 0x40) as *mut f32) = 0.0;
3132
*((current + 0x40) as *mut f32).add(1) = 0.0;
@@ -57,9 +58,10 @@ static HAZARDLESS_STAGE_IDS: &[u32] = &[
5758
#[skyline::hook(offset = 0x178ab60, inline)]
5859
unsafe fn init_stage(ctx: &mut skyline::hooks::InlineCtx) {
5960
let stage_id = *ctx.registers[1].w.as_ref();
60-
let is_alt_haz_off = ([0x59].contains(&stage_id) && get_current_stage_alt() == 0)
61-
|| (stage_id == 0x68 && get_current_stage_alt() == 0);
62-
if HAZARDLESS_STAGE_IDS.contains(&stage_id) || is_alt_haz_off {
61+
// let is_alt_haz_off = ([0x59].contains(&stage_id) && get_current_stage_alt() == 0)
62+
// || (stage_id == 0x68 && get_current_stage_alt() == 0);
63+
// if HAZARDLESS_STAGE_IDS.contains(&stage_id) || is_alt_haz_off {
64+
if HAZARDLESS_STAGE_IDS.contains(&stage_id) || stage_id == 0x68 || stage_id == 0x59 {
6365
*ctx.registers[3].w.as_mut() = 0;
6466
}
6567
}
@@ -76,9 +78,10 @@ unsafe fn handle_movement_grav_update(ctx: &mut skyline::hooks::InlineCtx) {
7678
unsafe fn fix_hazards_for_online(ctx: &skyline::hooks::InlineCtx) {
7779
let ptr = *ctx.registers[1].x.as_ref();
7880
let stage_id = *(ptr as *const u16) as u32;
79-
let is_alt_haz_off = ([0x59].contains(&stage_id) && get_current_stage_alt() == 0)
80-
|| (stage_id == 0x68 && get_current_stage_alt() == 0);
81-
if HAZARDLESS_STAGE_IDS.contains(&stage_id) || is_alt_haz_off {
81+
// let is_alt_haz_off = ([0x59].contains(&stage_id) && get_current_stage_alt() == 0)
82+
// || (stage_id == 0x68 && get_current_stage_alt() == 0);
83+
// if HAZARDLESS_STAGE_IDS.contains(&stage_id) || is_alt_haz_off {
84+
if HAZARDLESS_STAGE_IDS.contains(&stage_id) || stage_id == 0x68 || stage_id == 0x59 {
8285
*(ptr as *mut bool).add(0x10) = false;
8386
}
8487
}
@@ -97,11 +100,11 @@ unsafe fn lylat_no_rot(ctx: &mut skyline::hooks::InlineCtx) {
97100
// 0x4 - default haz off space
98101
#[skyline::hook(offset = 0x297D68C, inline)]
99102
unsafe fn lylat_set_form_hazards_off(ctx: &mut skyline::hooks::InlineCtx) {
100-
if get_current_stage_alt() == 0 {
101-
*ctx.registers[8].x.as_mut() = 0x2;
102-
} else {
103+
// if get_current_stage_alt() == 0 {
104+
// *ctx.registers[8].x.as_mut() = 0x2;
105+
// } else {
103106
*ctx.registers[8].x.as_mut() = 0x4;
104-
}
107+
// }
105108
}
106109

107110
pub fn install() {

fighters/common/src/general_statuses/shield/misc.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,13 @@ pub unsafe fn sub_guard_cont(fighter: &mut L2CFighterCommon) -> L2CValue {
425425
return true.into();
426426
}
427427

428+
// check parry
429+
if fighter.is_parry_input() {
430+
fighter.change_status(FIGHTER_STATUS_KIND_GUARD_OFF.into(), true.into());
431+
VarModule::on_flag(fighter.object(), vars::common::instance::IS_PARRY_FOR_GUARD_OFF);
432+
return true.into();
433+
}
434+
428435
// check jump
429436
if
430437
fighter.sub_check_button_jump().get_bool() ||
@@ -452,13 +459,6 @@ pub unsafe fn sub_guard_cont(fighter: &mut L2CFighterCommon) -> L2CValue {
452459
return true.into();
453460
}
454461

455-
// check parry
456-
if fighter.is_parry_input() {
457-
fighter.change_status(FIGHTER_STATUS_KIND_GUARD_OFF.into(), true.into());
458-
VarModule::on_flag(fighter.object(), vars::common::instance::IS_PARRY_FOR_GUARD_OFF);
459-
return true.into();
460-
}
461-
462462
return false.into();
463463
}
464464

fighters/lucario/src/status/special_hi.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ unsafe extern "C" fn lucario_special_hi_metered_cancel(fighter: &mut L2CFighterC
246246
WorkModule::enable_transition_term(fighter.module_accessor, *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_ATTACK_AIR);
247247
if fighter.sub_transition_group_check_air_attack().get_bool() {
248248
KineticModule::mul_speed(fighter.module_accessor, &Vector3f{x: 0.5, y: 0.5, z: 0.5}, *FIGHTER_KINETIC_ENERGY_ID_STOP);
249-
MeterModule::drain_direct(fighter.object(), MeterModule::meter_per_level(fighter.object()) * 2.0);
249+
MeterModule::drain_direct(fighter.battle_object, MeterModule::meter_per_level(fighter.battle_object));
250250
let frames = 120.max(VarModule::get_int(fighter.object(), vars::lucario::instance::METER_PAUSE_REGEN_FRAME));
251251
VarModule::set_int(fighter.object(), vars::lucario::instance::METER_PAUSE_REGEN_FRAME, frames);
252252
VarModule::on_flag(fighter.object(), vars::lucario::instance::IS_USPECIAL_ATTACK_CANCEL);

fighters/marth/src/acmd/aerials.rs

+4-5
Original file line numberDiff line numberDiff line change
@@ -123,19 +123,18 @@ unsafe fn marth_attack_air_hi_game(fighter: &mut L2CAgentBase) {
123123
frame(lua_state, 3.0);
124124
if is_excute(fighter) {
125125
WorkModule::on_flag(boma, *FIGHTER_STATUS_ATTACK_AIR_FLAG_ENABLE_LANDING);
126-
FT_MOTION_RATE(fighter, 2.0 / 2.5);
127126
}
128-
frame(lua_state, 5.45);
127+
frame(lua_state, 5.0);
128+
FT_MOTION_RATE_RANGE(fighter, 5.0, 13.0, 6.0);
129129
if is_excute(fighter) {
130-
FT_MOTION_RATE(fighter, 5.0 / 6.0);
131130
ATTACK(fighter, 0, 0, Hash40::new("sword1"), 13.0, 90, 70, 0, 45, 4.0, 0.0, 0.0, 7.75, None, None, None, 1.0, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_MARTH_SWORD, *ATTACK_REGION_SWORD);
132131
ATTACK(fighter, 1, 0, Hash40::new("sword1"), 10.0, 80, 70, 0, 30, 4.0, 0.0, 0.0, 3.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD);
133132
ATTACK(fighter, 2, 0, Hash40::new("armr"), 9.0, 80, 70, 0, 20, 3.5, 0.0, 1.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_M, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD);
134133
ATTACK(fighter, 3, 0, Hash40::new("claviclel"), 9.0, 80, 70, 0, 18, 3.5, 0.0, 0.0, 0.0, None, None, None, 0.8, 1.0, *ATTACK_SETOFF_KIND_ON, *ATTACK_LR_CHECK_POS, false, 0, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, Hash40::new("collision_attr_cutup"), *ATTACK_SOUND_LEVEL_S, *COLLISION_SOUND_ATTR_CUTUP, *ATTACK_REGION_SWORD);
135134
}
136-
frame(lua_state, 11.45);
135+
frame(lua_state, 13.0);
136+
FT_MOTION_RATE(fighter, 1.0);
137137
if is_excute(fighter) {
138-
FT_MOTION_RATE(fighter, 1.0);
139138
AttackModule::clear_all(boma);
140139
}
141140
frame(lua_state, 38.0);

fighters/pikmin/src/pikmin/acmd/specials.rs

+18-16
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,24 @@ unsafe fn game_spsremved(fighter: &mut L2CAgentBase) {
77
let boma = fighter.boma();
88
let variation = WorkModule::get_int(boma, *WEAPON_PIKMIN_PIKMIN_INSTANCE_WORK_ID_INT_VARIATION);
99
let p = PikminInfo::from(variation);
10-
if is_excute(fighter) {
11-
AttackModule::clear_all(boma);
12-
let dmg = 4.8;
13-
// special case for yellow pikmin
14-
// reduces the length of the paralyze effect
15-
let hitlag = if variation == 1 {
16-
0.4
17-
} else {
18-
1.0
19-
};
20-
ATTACK(fighter, 0, 0, Hash40::new("waist"), dmg * p.dmg, 90, 105, 0, 65, 6.0, 0.0, 0.0, 0.0, None, None, None, hitlag * p.hitlag, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr_special, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN);
21-
}
22-
frame(lua_state, 6.0);
23-
if is_excute(fighter) {
24-
AttackModule::clear_all(boma);
25-
fighter.change_status_req(WEAPON_PIKMIN_PIKMIN_STATUS_KIND_DEATH.into(), false.into());
10+
if VarModule::is_flag(fighter.battle_object, vars::pikmin::instance::SPECIAL_S_PIKMIN_DETONATE_IS_DETACH_FOR_DETONATE) {
11+
if is_excute(fighter) {
12+
AttackModule::clear_all(boma);
13+
let dmg = 4.8;
14+
// special case for yellow pikmin
15+
// reduces the length of the paralyze effect
16+
let hitlag = if variation == 1 {
17+
0.4
18+
} else {
19+
1.0
20+
};
21+
ATTACK(fighter, 0, 0, Hash40::new("waist"), dmg * p.dmg, 90, 105, 0, 65, 6.0, 0.0, 0.0, 0.0, None, None, None, hitlag * p.hitlag, 0.5, *ATTACK_SETOFF_KIND_OFF, *ATTACK_LR_CHECK_POS, false, dmg * p.shield_dmg, 0.0, 0, false, false, false, false, true, *COLLISION_SITUATION_MASK_GA, *COLLISION_CATEGORY_MASK_ALL, *COLLISION_PART_MASK_ALL, false, p.attr_special, *ATTACK_SOUND_LEVEL_L, p.sound, *ATTACK_REGION_PIKMIN);
22+
}
23+
frame(lua_state, 6.0);
24+
if is_excute(fighter) {
25+
AttackModule::clear_all(boma);
26+
fighter.change_status_req(WEAPON_PIKMIN_PIKMIN_STATUS_KIND_DEATH.into(), false.into());
27+
}
2628
}
2729
}
2830

fighters/pikmin/src/pikmin/status.rs

+26-10
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,13 @@ use globals::*;
44

55
pub fn install() {
66
install_status_scripts!(
7-
special_s_cling_main
7+
special_s_cling_main,
8+
special_s_cling_remove_end,
89
);
910
}
1011

12+
// WEAPON_PIKMIN_PIKMIN_STATUS_KIND_SPECIAL_S_CLING
13+
1114
#[status_script(agent = "pikmin_pikmin", status = WEAPON_PIKMIN_PIKMIN_STATUS_KIND_SPECIAL_S_CLING, condition = LUA_SCRIPT_STATUS_FUNC_STATUS_MAIN)]
1215
pub unsafe fn special_s_cling_main(fighter: &mut L2CFighterCommon) -> L2CValue {
1316
fighter.off_flag(*WEAPON_PIKMIN_PIKMIN_STATUS_SPECIAL_S_WORK_FLAG_POKEMON_CHANGE_START);
@@ -36,6 +39,7 @@ pub unsafe fn special_s_cling_main(fighter: &mut L2CFighterCommon) -> L2CValue {
3639
let p = PikminInfo::from(variation);
3740
VarModule::set_int(fighter.battle_object, vars::pikmin::status::SPECIAL_S_PIKMIN_DETONATE_TIMER, 0);
3841
VarModule::off_flag(fighter.battle_object, vars::pikmin::status::SPECIAL_S_PIKMIN_DETONATE_IS_ATTACK_LAST_FRAME);
42+
VarModule::off_flag(fighter.battle_object, vars::pikmin::instance::SPECIAL_S_PIKMIN_DETONATE_IS_DETACH_FOR_DETONATE);
3943

4044
fighter.fastshift(L2CValue::Ptr(special_s_cling_main_loop as *const () as _))
4145
}
@@ -47,15 +51,19 @@ unsafe extern "C" fn special_s_cling_main_loop(fighter: &mut L2CFighterCommon) -
4751
let variation = fighter.get_int(*WEAPON_PIKMIN_PIKMIN_INSTANCE_WORK_ID_INT_VARIATION);
4852
let p = PikminInfo::from(variation);
4953

50-
let is_attack = AttackModule::is_attack(fighter.module_accessor, 0, false);
51-
if is_attack && !VarModule::is_flag(fighter.battle_object, vars::pikmin::status::SPECIAL_S_PIKMIN_DETONATE_IS_ATTACK_LAST_FRAME) {
52-
VarModule::inc_int(fighter.battle_object, vars::pikmin::status::SPECIAL_S_PIKMIN_DETONATE_TIMER);
53-
}
54-
VarModule::set_flag(fighter.battle_object, vars::pikmin::status::SPECIAL_S_PIKMIN_DETONATE_IS_ATTACK_LAST_FRAME, is_attack);
55-
56-
if VarModule::get_int(fighter.battle_object, vars::pikmin::status::SPECIAL_S_PIKMIN_DETONATE_TIMER) >= p.cling_frame{
57-
fighter.change_status(WEAPON_PIKMIN_PIKMIN_STATUS_KIND_SPECIAL_S_CLING_REMOVE.into(), false.into());
58-
return 1.into();
54+
if !fighter.global_table[IS_STOPPING].get_bool()
55+
&& !StatusModule::is_changing(fighter.module_accessor)
56+
{
57+
let is_attack = AttackModule::is_attack(fighter.module_accessor, 0, false);
58+
if is_attack && !VarModule::is_flag(fighter.battle_object, vars::pikmin::status::SPECIAL_S_PIKMIN_DETONATE_IS_ATTACK_LAST_FRAME) {
59+
VarModule::inc_int(fighter.battle_object, vars::pikmin::status::SPECIAL_S_PIKMIN_DETONATE_TIMER);
60+
}
61+
VarModule::set_flag(fighter.battle_object, vars::pikmin::status::SPECIAL_S_PIKMIN_DETONATE_IS_ATTACK_LAST_FRAME, is_attack);
62+
if VarModule::get_int(fighter.battle_object, vars::pikmin::status::SPECIAL_S_PIKMIN_DETONATE_TIMER) >= p.cling_frame{
63+
VarModule::on_flag(fighter.battle_object, vars::pikmin::instance::SPECIAL_S_PIKMIN_DETONATE_IS_DETACH_FOR_DETONATE);
64+
fighter.change_status(WEAPON_PIKMIN_PIKMIN_STATUS_KIND_SPECIAL_S_CLING_REMOVE.into(), false.into());
65+
return 1.into();
66+
}
5967
}
6068

6169
if fighter.is_flag(*WEAPON_PIKMIN_PIKMIN_INSTANCE_WORK_ID_FLAG_IS_SPECIAL_S_CLING_ENEMY)
@@ -78,4 +86,12 @@ unsafe extern "C" fn special_s_cling_main_loop(fighter: &mut L2CFighterCommon) -
7886
}
7987

8088
return 0.into();
89+
}
90+
91+
// WEAPON_PIKMIN_PIKMIN_STATUS_KIND_SPECIAL_S_CLING_REMOVE
92+
93+
#[status_script(agent = "pikmin_pikmin", status = WEAPON_PIKMIN_PIKMIN_STATUS_KIND_SPECIAL_S_CLING_REMOVE, condition = LUA_SCRIPT_STATUS_FUNC_STATUS_END)]
94+
pub unsafe fn special_s_cling_remove_end(fighter: &mut L2CFighterCommon) -> L2CValue {
95+
VarModule::off_flag(fighter.battle_object, vars::pikmin::instance::SPECIAL_S_PIKMIN_DETONATE_IS_DETACH_FOR_DETONATE);
96+
original!(fighter)
8197
}

0 commit comments

Comments
 (0)