require("config.util") local mods = {} function mods.startup_fa(pat) pat:update_frame(301, 0, 0, { duration = 2 }) pat:update_frame(301, 0, 1, { duration = 2 }) end function mods.hurtbox_fa(pat) for idx = 8, 9 do pat:update_frame(301, 0, idx, function(frame) table.remove(frame.hurtbox) end) end end function mods.recovery_fa(pat, begin) for idx = begin, 16 do pat:update_frame(301, 0, 9, function(frame) frame.duration = frame.duration - 1 end) end end function mods.recovery_3a(pat) pat:update_frame(304, 0, 6, { duration = 5 }) pat:update_frame(304, 0, 11, { duration = 3 }) pat:update_frame(304, 0, 12, { duration = 3 }) end function mods.damage_parameters_3a(pat) pat:update_frame(304, 0, 4, { proration = 850 }) end function mods.recovery_ja(pat) for idx = 5, 10 do pat:update_frame(301, 0, 9, function(frame) frame.duration = frame.duration - 1 end) end end function mods.untech_ja(pat) pat:update_frame(306, 0, 4, { untech = 30 }) end function mods.startup_j6a(pat) pat:update_frame(307, 0, 1, { duration = 3 }) end function mods.recovery_j6a(pat) pat:update_frame(307, 0, 7, { duration = 17 }) end function mods.hitbox_j6a(pat) pat:update_frame(307, 0, 5, function(frame) frame.attackbox[2].x1 = frame.attackbox[2].x1 - 40 end) end function mods.startup_j2a(pat) pat:update_frame(308, 0, 3, { duration = 3 }) end function mods.hurtbox_j2a(pat) for idx = 6, 7 do pat:update_frame(308, 0, idx, function(frame) table.remove(frame.hurtbox) end) end end function mods.startup_6b(pat) pat:update_frame(401, 0, 7, function(frame) set_fflag(frame, FF_CANCEL + FF_MOTION_CANCEL) end) end function mods.startup_2b(pat) pat:update_frame(402, 0, 2, { duration = 4 }) end function mods.startup_j2b(pat) pat:update_frame(406, 0, 2, { duration = 3 }) pat:update_frame(406, 0, 3, { duration = 3 }) end function mods.spirit_drain_b(pat) pat:update_frame(800, 0, 0, { sp_damage = 20 }) pat:update_frame(800, 1, 0, { sp_damage = 30 }) pat:update_frame(800, 2, 0, { sp_damage = 50 }) end function mods.startup_6c(pat) pat:get_frame(410, 0, 0, { duration = 2 }) pat:get_frame(410, 0, 1, { duration = 2 }) end function mods.startup_j2c(pat) pat:get_frame(416, 0, 0, { duration = 2 }) pat:get_frame(416, 0, 1, { duration = 2 }) end function mods.density_6c(pat) bullet_801_0 = pat:get_sequence(801, 0) -- wisp bullet_801_2 = pat:get_sequence(801, 2) -- wind circle local a, b = bullet_801_0:get_priority() bullet_801_2:set_priority(a, b) end function mods.bound_spirits_hit_parameters(pat) for idx = 0, 1 do pat:update_frame(815, 0, idx, { untech = 45, launch_vector_y = 1100, }) pat:set_frame(815, 3, idx, pat:get_frame(815, 0, idx)) end end function mods.last_journey_hit_parameters(pat) for seq = 525, 526 do for off = 1, 3, 2 do for idx = 0, 1 do pat:update_frame(seq, off, idx, { untech = 60 }) end end end end function mods.boat_on_the_sanzu_cancel_parameters(pat) for seq = 530, 531 do pat:get_sequence(seq, 6):set_priority(20, 30) pat:get_sequence(seq, 8):set_priority(20, 30) end end function mods.boat_on_the_sanzu_graze_before_j8a(pat) for seq = 530, 531 do for idx = 0, 2 do pat:update_frame(seq, 7, idx, function(frame) set_fflag(frame, FF_GRAZE) end) end end end function mods.boat_on_the_sanzu_ground_bounce(pat) for seq = 530, 531 do for idx = 5, 6 do pat:update_frame(seq, 3, idx, { -- proration = 750, hit_ani_air = 71, hit_ani_ground = 71, -- launch_vector_y = -2450, }) end end end function mods.taste_of_death_recovery(pat) pat:update_frame(550, 2, 7, { duration = 10 }) end function mods.flow_of_the_river_last_hit_parameters(pat) pat:update_frame(600, 2, 0, { duration = 6, attack_level = AL_SUPERHEAVY, }) end function mods.avici_strike_bounce(pat) pat:update_frame(611, 0, 9, { hit_ani_ground = 88, hit_ani_air = 88, }) end function mods.avici_no_restand(pat) for idx = 0, 1 do pat:update_frame(861, 1, idx, { hit_ani_air = 71, hit_ani_air = 71, launch_vector_y = -1000, }) end end function mods.damage_final_judgement(pat, damage) for idx = 0, 8 do pat:update_frame(856, 0, idx, { damage = damage }) end end function mods.standing_hit_hurtbox(pat) for seq = 50, 52 do for idx = 0, 1 do pat:update_frame(seq, 0, idx, function(frame) frame.hurtbox = pat:get_frame(50, 0, 2).hurtbox end) end end end return function(pat) mods.hurtbox_fa(pat) if config:get("komachi", "fa", "reduce_startup") then mods.startup_fa(pat) end if config:get("komachi", "fa", "reduce_recovery") then if config:get("komachi", "fa", "reduce_startup") then mods.recovery_fa(pat, 13) else mods.recovery_fa(pat, 11) end end if config:get("komachi", "3a", "reduce_recovery") then mods.recovery_3a(pat) end if config:get("komachi", "3a", "adjust_damage_parameters") then mods.damage_parameters_3a(pat) end mods.recovery_ja(pat) mods.untech_ja(pat) if config:get("komachi", "j6a", "reduce_startup") then mods.startup_j6a(pat) end mods.recovery_j6a(pat) mods.hitbox_j6a(pat) mods.hurtbox_j2a(pat) if config:get("komachi", "j2a", "reduce_startup", 1) then mods.startup_j2a(pat) end mods.startup_6b(pat) if config:get("komachi", "b_series", "2b", "reduce_startup", 1) then mods.startup_2b(pat) end if config:get("komachi", "b_series", "j2b", "reduce_startup", 1) then mods.startup_j2b(pat) end if config:get("komachi", "b_series", "increase_spirit_damage") then mods.spirit_drain_b(pat) end -- mods.startup_6c(pat) -- mods.startup_j2c(pat) if config:get("komachi", "c_series", "high_priority") then mods.density_6c(pat) end if config:get("komachi", "bound_spirits", "active_on_creation") then mods.bound_spirits_hit_parameters(pat) end if config:get("komachi", "boat_on_the_sanzu", "graze_before_j8a_feint") then mods.boat_on_the_sanzu_graze_before_j8a(pat) end if config:get("komachi", "boat_on_the_sanzu", "feint_attack_bullet_cancelable") then mods.boat_on_the_sanzu_cancel_parameters(pat) end if config:get("komachi", "boat_on_the_sanzu", "auto_attack_ground_bounce") then mods.boat_on_the_sanzu_ground_bounce(pat) end -- mods.last_journey_hit_parameters(pat) mods.taste_of_death_recovery(pat) mods.flow_of_the_river_last_hit_parameters(pat) -- mods.damage_final_judgement(pat, 4500) if config:get("komachi", "narrow_confines_of_avici", "strike_bounce") then mods.avici_strike_bounce(pat) end if config:get("komachi", "narrow_confines_of_avici", "no_restand") then mods.avici_no_restand(pat) end if config:get("komachi", "standing_hitstun", "modify_hurtbox") then mods.standing_hit_hurtbox(pat) end end