require("config.util") local mods = {} function mods.crouch_hurtbox(pat) local function adjust(seq, off, idx) pat:update_frame(seq, off, idx, function(frame) -- msgbox.format("%d:%d:%d: %s", seq, off, idx, table.tostring(frame.hurtbox)) frame.hurtbox[1].y1 = frame.hurtbox[2].y1 frame.hurtbox[1].x1 = -29 frame.hurtbox[1].x2 = 29 frame.hurtbox = {frame.hurtbox[1]} end) end for idx = 1, 4 do adjust(1, 0, idx) end for idx = 0, 2 do adjust(3, 0, idx) end adjust(2, 0, 0) end function mods.startup_6a(pat) pat:update_frame(302, 0, 0, { duration = 1 }) end function mods.startup_3a(pat) pat:remove_frame(304, 0, 0) end function mods.dc_launch_vector(pat) for idx = 4, 6 do pat:update_frame(418, 0, idx, { launch_vector_x = 1250 }) end end function mods.sense_of_thrown_edge_parameters(pat) pat:update_frame(817, 0, 2, { damage = 200, untech = 45, limit = 5, sp_damage = 30 }) end function mods.sense_of_thrown_edge_delay(pat, delay) pat:update_frame(817, 0, 1, { duration = delay }) end function mods.parallel_brain_motion_cancel(pat) for seq = 550, 551 do pat:update_frame(seq, 0, 9, { duration = 11 }) pat:update_frame(seq, 0, 10, { duration = 13 }) end for seq = 552, 553 do pat:update_frame(seq, 0, 5, { duration = 11 }) pat:update_frame(seq, 0, 6, { duration = 13 }) end end function mods.killing_doll_object_parameters(pat) pat:update_frame(850, 2, 0, { proration = 920, -- sp_damage = 14, }) end function mods.propelling_silver_motion_cancel(pat) for seq = 505, 506 do pat:update_frame(seq, 1, 3, set_attack_and_motion_cancel) end end function mods.propelling_silver_object_parameters(pat) pat:update_frame(815, 0, 1, { sp_damage = 30, blockstop_enemy = 5, }) end function mods.time_paradox_startup(pat) pat:update_frame(570, 0, 0, { duration = 2 }) pat:update_frame(570, 0, 1, { duration = 2 }) end function mods.time_paradox_hit_parameters(pat) local changes = { untech = 90, launch_vector_y = 2300, } for idx = 4, 5 do pat:update_frame(823, 4, idx, changes) pat:update_frame(571, 4, idx, changes) end end return function(pat) if config:get("sakuya", "6a", "reduce_startup") then mods.startup_6a(pat) end if config:get("sakuya", "3a", "reduce_startup") then mods.startup_3a(pat) end if config:get("sakuya", "dc", "modify_launch_vector") then mods.dc_launch_vector(pat) end if config:get("sakuya", "sense_of_thrown_edge", "adjust_object_parameters") then mods.sense_of_thrown_edge_parameters(pat) end mods.sense_of_thrown_edge_delay(pat, config:getdef("sakuya", "sense_of_thrown_edge", "delay", 180)) if config:get("sakuya", "parallel_brain", "faster_motion_cancel") then mods.parallel_brain_motion_cancel(pat) end mods.propelling_silver_motion_cancel(pat) mods.propelling_silver_object_parameters(pat) if config:get("sakuya", "time_paradox", "reduce_startup") then mods.time_paradox_startup(pat) end if config:get("sakuya", "time_paradox", "modify_parameters") then mods.time_paradox_hit_parameters(pat) end if config:get("sakuya", "killing_doll", "adjust_parameters") then mods.killing_doll_object_parameters(pat) end if config:get("sakuya", "crouch", "adjust_hurtbox") then mods.crouch_hurtbox(pat) end end