require("config.util") local mods = {} function mods.smash_attack_j2a(pat) pat:update_frame(308, 0, 4, { combo_correction = CC_SMASH_ATTACK }) end function mods.rocket_kick_upper_motion_cancel(pat) pat:update_frame(545, 0, 7, { duration = 8 }) pat:update_frame(545, 0, 8, { duration = 27 }) end function mods.rocket_kick_upper_object_parameters(pat) for _, off in ipairs {0, 3, 4} do for idx = 0, 9 do pat:update_frame(821, off, idx, { hitstop_enemy = 10 }) end end end function mods.rocket_kick_upper_hitbox(pat) local boxes = pat:get_frame(821, 0, 0).attackbox -- local delta = boxes[2].x2 + boxes[2].x1 -- local delta = boxes[3].x1 - boxes[2].x1 local delta = 40 for _, off in ipairs {0, 3, 4} do for idx = 0, 9 do pat:update_frame(821, off, idx, function(frame) frame.attackbox[1].x1 = frame.attackbox[1].x1 - delta frame.attackbox[2].x1 = frame.attackbox[2].x1 - delta frame.attackbox[3].x1 = frame.attackbox[3].x1 - delta end) end end end function mods.stigmatizer_motion_cancel(pat) for seq = 570, 571 do for idx = 12, 16 do pat:update_frame(seq, 1, idx, set_motion_cancel) end end end function mods.stigmatizer_object_parameters(pat) for _, off in ipairs {0, 5} do for idx = 0, 1 do pat:update_frame(827, off, idx, { hitstop_enemy = 10, untech = 40, }) end end end function mods.scarlet_devil_hitbox(pat) local delta = 50 local function reduce_hitbox(frame) frame.attackbox[1].x1 = frame.attackbox[1].x1 + delta frame.attackbox[1].x2 = frame.attackbox[1].x2 - delta end for idx = 4, 9 do pat:update_frame(853, 0, idx, reduce_hitbox) end for idx = 0, 9 do pat:update_frame(853, 1, idx, reduce_hitbox) end end return function(pat) mods.smash_attack_j2a(pat) if config:get("remilia", "rocket_kick_upper", "increase_hitbox") then mods.rocket_kick_upper_hitbox(pat) end if config:get("remilia", "rocket_kick_upper", "faster_motion_cancel") then mods.rocket_kick_upper_motion_cancel(pat) end if config:get("remilia", "rocket_kick_upper", "modify_parameters") then mods.rocket_kick_upper_object_parameters(pat) end if config:get("remilia", "stigmatizer", "faster_motion_cancel") then mods.stigmatizer_motion_cancel(pat) end if config:get("remilia", "stigmatizer", "modify_parameters") then mods.stigmatizer_object_parameters(pat) end if config:get("remilia", "scarlet_devil", "reduce_hitbox") then mods.scarlet_devil_hitbox(pat) end end