require("config.util") local mods = {} function mods.recovery_ja(pat) pat:update_frame(306, 0, 5, { duration = 10 }) end function mods.duration_j6a(pat, delta_6, delta_7) pat:update_frame(307, 0, 6, { duration = 3 + delta_6 }) pat:update_frame(307, 0, 7, { duration = 14 - delta_7 }) end function mods.hit_parameters_db(pat) for off = 1, 3 do pat:update_frame(408, off, 0, { hit_ani_ground = 0 }) end end function mods.ungrazable_drills(pat) for off = 4, 5 do for idx = 0, 2 do pat:update_frame(800, off, idx, function(frame) set_aflag(frame, AF_UNGRAZABLE) end) end end end function mods.six_signs_mid_hit(pat) pat:update_frame(811, 6, 0, function(frame) set_aflag(frame, AF_HIGHBLOCK_OK) end) end function mods.six_signs_motion_cancel_b(pat) pat:update_frame(505, 0, 8, { duration = 5 }) pat:update_frame(505, 0, 12, { duration = 15 }) end function mods.six_signs_motion_cancel_c_1(pat) pat:update_frame(506, 0, 11, { duration = 15 }) pat:update_frame(506, 0, 12, { duration = 15 }) end function mods.six_signs_motion_cancel_c_2(pat) pat:update_frame(506, 0, 8, { duration = 15 }) pat:update_frame(506, 0, 11, { duration = 15 }) pat:update_frame(506, 0, 12, { duration = 15 }) end function mods.sky_attack_startup(pat) for seq = 570, 571 do pat:update_frame(seq, 0, 0, { duration = 1 }) pat:update_frame(seq, 0, 1, { duration = 1 }) end end function mods.sky_attack_hit_parameters(pat, args) for i = 570, 572, 2 do for j = 0, 3 do pat:update_frame(i, 1, j, args) end end for i = 571, 573, 2 do for j = 0, 5 do pat:update_frame(i, 1, j, args) end end end function mods.heaven_and_earth_press_paramaters(pat) for _, off in ipairs({2, 3, 10, 11}) do for idx = 0, 3 do pat:update_frame(821, off, idx, { sp_damage = 50 }) end end for _, off in ipairs({7, 12}) do pat:update_frame(821, off, 0, { sp_damage = 100 }) end end function mods.heaven_and_earth_press_cancel(pat) for seq_id = 545, 548 do pat:update_frame(seq_id, 2, 3, function(frame) set_fflag(frame, FF_ATTACK_CANCEL + FF_MOTION_CANCEL) end) end end function mods.guardian_keystone_startup(pat) pat:update_frame(525, 0, 2, { duration = 5 }) end function mods.sword_of_fate_catch_recovery(pat) pat:update_frame(514, 0, 1, { duration = 5 }) pat:split_frame(514, 1, 1, 5, 10) end function mods.sword_of_fate_catch_cancel_properties(pat) for off = 0, 1 do for idx = 1, pat:get_sequence(514, off):get_frame_count() - 1 do pat:update_frame(514, off, idx, function(frame) set_fflag(frame, idx < 2 and FF_ATTACK_CANCEL or FF_ATTACK_CANCEL + FF_MOTION_CANCEL) end) end end end function mods.sword_of_fate_bullet_properties(pat) for idx = 0, 3 do pat:update_frame(812, 0, idx, { sp_damage = 50 }) end end function mods.sword_of_scarlet_perception_recovery(pat) pat:update_frame(565, 0, 8, { blockstop_enemy = 7 }) end return function(pat) if config:get("tenshi", "ja", "reduce_recovery") then mods.recovery_ja(pat) end mods.duration_j6a( config:getdef("tenshi", "j6a", "extend_active_time_by", 0), config:getdef("tenshi", "j6a", "reduce_recovery_by", 0) ) if config:get("tenshi", "db", "remove_launch") then mods.hit_parameters_db(pat) end -- mods.ungrazable_drills(pat) if config:get("tenshi", "six_signs", "accept_high_block") then mods.six_signs_mid_hit(pat) end if config:get("tenshi", "six_signs", "faster_motion_cancel_b") then mods.six_signs_motion_cancel_b(pat) end if config:get("tenshi", "six_signs", "faster_motion_cancel_c") == 1 then mods.six_signs_motion_cancel_c_1(pat) elseif config:get("tenshi", "six_signs", "faster_motion_cancel_c") == 2 then mods.six_signs_motion_cancel_c_2(pat) end if config:get("tenshi", "sword_of_fate", "reduce_catch_recovery") then mods.sword_of_fate_catch_recovery(pat) mods.sword_of_fate_catch_cancel_properties(pat) end mods.sword_of_fate_bullet_properties(pat) mods.heaven_and_earth_press_cancel(pat) if config:get("tenshi", "heaven_and_earth_press", "increase_spirit_damage") then mods.heaven_and_earth_press_paramaters(pat) end if config:get("tenshi", "sword_of_scarlet_perception", "adjust_recovery") then mods.sword_of_scarlet_perception_recovery(pat) end if config:get("tenshi", "sky_attack", "reduce_startup") then mods.sky_attack_startup(pat) end mods.sky_attack_hit_parameters(pat, { damage = config:getdef("tenshi", "sky_attack", "damage", 1000), untech = 90, }) mods.guardian_keystone_startup(pat) end