local mods = {} function mods.modify_j2a_startup(pat) for idx = 0, 2 do pat:update_frame(308, 0, idx, { duration = 1 }) end pat:update_frame(308, 1, 0, { hit_ani_air = 88, hit_ani_ground = 88, hitstop_self = 0, blockstop_self = 0, proration = 785 }) pat:update_frame(308, 1, 1, { hit_ani_air = 88, hit_ani_ground = 88, hitstop_self = 0, blockstop_self = 0, proration = 785 }) for frame = 4, 6 do pat:update_frame(308, 2, frame, { duration = 2 }) end end function mods.modifyj6auntech(pat) for frame = 4, 6 do pat:update_frame(307, 0, frame, { untech = 6000 }) end end function mods.modify_swordrang_recovery(pat) table.map({0,1,2,3,5,4,6}, function(off) pat:update_frame(514, 0, off, { duration = 3 }) end) table.map({0,1,2,3,4}, function(off) pat:update_frame(514, 1, off, { duration = 3 }) end) end function mods.modify_crush_untech(pat) pat:update_frame(821, 7, 0, { untech = 9000, proration = 900 }) pat:update_frame(821, 12, 0, { untech = 9000, proration = 900 }) for frame = 0, 3 do pat:update_frame(821, 2, frame, { untech = 9000 }) pat:update_frame(821, 3, frame, { untech = 9000 }) pat:update_frame(821, 10, frame, { untech = 9000 }) pat:update_frame(821, 11, frame, { untech = 9000 }) end end function mods.modify_SWR_startup(pat) pat:update_frame(607, 0, 7, { duration = 1 }) pat:update_frame(607, 0, 0, { duration = 1 }) pat:update_frame(657, 0, 7, { duration = 1 }) pat:update_frame(657, 0, 0, { duration = 1 }) end function mods.modify_f5A_animation(pat) for idx = 2, 7 do for seq = 0, 1 do pat:update_frame(301, seq, idx, { hit_ani_air = 88, launch_vector_y = -2000, untech = 30, damage = 550}) end end end function mods.modify_j5a_untech(pat) pat:update_frame(306, 0, 4, { untech = 30 }) end function mods.modify_3a_(pat) pat:update_frame(304, 0, 4, { untech = 6000 }) pat:update_frame(304, 1, 2, { untech = 6000 }) end function mods.dial_a_untech(pat) pat:update_frame(321, 0, 4, { untech = 6000 }) end function mods.sealrecovery(pat) pat:update_frame(600, 0, 6, { proration = 1000 }) local function set_hjc(frame) set_fflag(frame, FF_CANCEL) end for frame = 3, 5 do pat:update_frame(601, 1, frame, set_hjc) end pat:get_sequence(601, 1):set_priority(0, 0) end function mods.modifyj8auntech(pat) pat:update_frame(309, 0, 3, { untech = 60 }) end function mods.modifyCuntech(pat) for frame = 0, 1 do pat:update_frame(801, 0, frame, { untech = 60, hitstop_enemy = 15 }) end end function mods.modifypressureuntech(pat) for frame = 0, 1 do pat:update_frame(859, 0, frame, { untech = 6000 }) end end function mods.modify_superarmor_recovery(pat) for frame = 0, 1 do pat:update_frame(606, 0, frame, { duration = 1 }) end for frame = 4, 5 do pat:update_frame(606, 0, frame, { duration = 1 }) end pat:update_frame(606, 0, 2, { duration = 1 }) pat:update_frame(606, 0, 3, { duration = 1 }) pat:update_frame(606, 1, 0, { duration = 1 }) for frame = 0, 2 do pat:update_frame(606, 2, frame, { duration = 1 }) end end function mods.cancel(pat) pat:get_sequence(300, 0):set_priority(15, 20) -- 5A pat:get_sequence(320, 0):set_priority(10, 20) -- 5AA pat:get_sequence(303, 0):set_priority(10, 15) -- 2A pat:get_sequence(330, 0):set_priority(15, 20) -- 4A pat:get_sequence(321, 0):set_priority(20, 30) end function mods.make_intense_slash(pat) pat:update_frame(608, 1, 1, { hit_ani_ground = 71, hit_ani_air = 71, hitstop_enemy = 0, launch_vector_x = 0 }) pat:update_frame(608, 1, 6, { hit_ani_ground = 88, hit_ani_air = 88, launch_vector_y = -1200, launch_vector_x = 0, hitstop_enemy = 0 }) end function mods.reduceBdamage(pat) for seq = 4, 5 do for frame = 0, 2 do pat:update_frame(800, seq, frame, { damage = 140, proration = 990, untech = 35 }) end end end function mods.idk(pat) pat:update_frame(853, 6, 0, { sp_damage = 55, chip_damage = 100 }) pat:update_frame(853, 7, 0, { sp_damage = 50, chip_damage = 100 }) for frame = 11, 14 do pat:update_frame(603, 0, frame, { duration = 4 }) end local function set_block(frame) set_aflag(frame, AF_LOWBLOCK_OK) end pat:update_frame(853, 6, 0, function(frame) unset_aflag(frame, AF_GROUND_UNBLOCKABLE) end) pat:update_frame(853, 7, 0, function(frame) unset_aflag(frame, AF_GROUND_UNBLOCKABLE) end) pat:update_frame(853, 6, 0, set_block) pat:update_frame(853, 7, 0, set_block) end function mods.modifyswr_damage(pat) for frame = 5, 9 do pat:update_frame(857, 3, frame, { proration = 950 }) end for frame = 0, 8 do pat:update_frame(857, 4, frame, { proration = 950 }) end end function mods.modify2card(pat) pat:update_frame(850, 6, 0, { untech = 6000 }) end function mods.modify4laser(pat) for frame = 0, 1 do pat:update_frame(854, 0, frame, { untech = 6000, damage = 1000, launch_vector_x = 3000, launch_vector_y = 1000, sp_damage = 100, hitstop_self = 4, hitstop_enemy = 8 }) pat:update_frame(854, 6, frame, { untech = 6000, damage = 750, sp_damage = 75 }) end end function mods.change_623_sky_attack(pat) for i = 570, 572, 2 do for j = 0, 3 do pat:update_frame(i, 1, j, function(frame) frame.untech = 6000 frame.damage = 1200 set_fflag(frame, FF_MELEE_INV) end) end end for i = 571, 573, 2 do for j = 0, 5 do pat:update_frame(i, 1, j, function(frame) frame.untech = 6000 frame.damage = 1250 set_fflag(frame, FF_MELEE_INV) end) end end end function mods.sword_of_fate_bullet_properties(pat) for idx = 0, 3 do pat:update_frame(812, 0, idx, { damage = 300, untech = 60, sp_damage = 50, hit_ani_ground = 53, hit_ani_air = 77, hitstop_self = 3 }) end end function mods.modify66b(pat) for seq = 1, 3 do pat:update_frame(408, seq, 0, { hit_ani_ground = 0 }) end end function mods.modifyarmor6a(pat) local function set_armor(frame) set_fflag(frame, 129) end for st = 1, 3 do pat:update_frame(302, 1, st, set_armor) pat:update_frame(302, 1, st, { hit_sfx = 4 }) end pat:update_frame(302, 1, 3, { duration = 15, damage = 1050, hitstop_enemy = 15 }) pat:update_frame(302, 1, 6, { duration = 1 }) pat:update_frame(302, 1, 7, { duration = 2 }) end function mods.modifyalt22box(pat) pat:update_frame(525, 0, 2, { duration = 50 }) for frame = 0, 3 do pat:update_frame(816, 0, frame, function(frame) frame.attackbox[1]= pat:get_frame(816, 2, 0).attackbox[1] -- set_aflag(frame, 3076) frame.attack_level = 2 frame.card_gain_block = 30 frame.card_gain_hit = 30 frame.chip_damage = 50 frame.combo_correction = 2 -- frame.data_format = 0 frame.hit_effect = 3 -- frame.duration = 10 frame.sp_damage = 10 frame.unknown_9 = 100 frame.damage = 200 frame.hitstop_enemy = 2 frame.hitstop_self = 60 frame.duration = 1 frame.blockstop_enemy = 4 frame.blockstop_self = 60 frame.proration = 920 frame.limit = 0 frame.hit_ani_ground = 0 frame.hit_ani_air = 71 frame.untech = 45 frame.launch_vector_x = 1000 frame.launch_vector_y = 1000 frame.hit_sfx = 3 set_aflag(frame, AF_PROJECTILE) set_aflag(frame, AF_HIGHBLOCK_OK) set_aflag(frame, AF_LOWBLOCK_OK) set_aflag(frame, AF_AIR_BLOCKABLE) end) end end function mods.modifymeleesword(pat) for frame = 3, 5 do pat:update_frame(822, 0, frame, function(frame) unset_aflag(frame, AF_PROJECTILE) end) pat:update_frame(822, 4, frame, function(frame) unset_aflag(frame, AF_PROJECTILE) end) end end function mods.modifyspirits(pat) for frame = 0, 2 do pat:update_frame(817, 4, frame, function(frame) frame.hit_ani_air = 88 frame.hit_ani_ground = 88 frame.hit_sfx = 4 frame.launch_vector_y = -2500 frame.untech = 60 frame.damage = 1000 frame.launch_vector_x = 500 end) end pat:update_frame(817, 11, 0, { hitstop_enemy = 30, hit_ani_ground = 0}) pat:update_frame(817, 12, 0, { hitstop_enemy = 30, hit_ani_ground = 0}) for frame = 7, 8 do pat:update_frame(530, 0, frame, { duration = 2 }) pat:update_frame(531, 0, frame, { duration = 2 }) end pat:update_frame(531, 0, 12, { duration = 10 }) pat:update_frame(530, 0, 12, { duration = 10 }) end function mods.modifyj8aani(pat) for idx = 0, 2 do local src = pat:get_frame(566, 0, idx + 10) local boxes = pat:get_frame(566, 0, idx + 10).hurtbox pat:update_frame(309, 0, idx, function(frame) copy_sprite(frame, src) frame.hurtbox = table.map(boxes, table.shallow_copy) end) pat:update_frame(309, 0, 3, function(frame) copy_sprite(frame, src) frame.hurtbox = table.map(boxes, table.shallow_copy) end) local src = pat:get_frame(566, 0, 12) local boxes = pat:get_frame(566, 0, 12).hurtbox pat:update_frame(309, 0, 4, function(frame) copy_sprite(frame, src) frame.hurtbox = table.map(boxes, table.shallow_copy) end) local src = pat:get_frame(566, 0, 13) local boxes = pat:get_frame(566, 0, 13).hurtbox local box = pat:get_frame(566, 0, 13).attackbox pat:update_frame(309, 0, 5, function(frame) copy_sprite(frame, src) frame.hurtbox = table.map(boxes, table.shallow_copy) frame.attackbox = table.map(box, table.shallow_copy) end) end for idx = 6, 10 do local src = pat:get_frame(566, 0, idx + 8) local boxes = pat:get_frame(566, 0, idx + 8).hurtbox pat:update_frame(309, 0, idx, function(frame) copy_sprite(frame, src) frame.hurtbox = table.map(boxes, table.shallow_copy) end) end end function mods.maketaunt(pat) local onum = pat:get_frame_count(0, 0) local src = pat:get_frame(0, 0, pat:get_frame_count(0, 0) - 1) local oframe = src.duration for loop = 0, 2 do for count = 0, onum - 1 do pat:split_frame(0, 0, (onum*(loop + 1)) - 1, oframe, 1) end for idx = 0, onum - 1 do local src = pat:get_frame(0, 0, idx) pat:update_frame(0, 0, (onum*(loop + 1) + idx) , function(frame) copy_sprite(frame, src) frame.duration = src.duration end) end end local num = pat:get_frame_count(0, 0) local src = pat:get_frame(0, 0, pat:get_frame_count(0, 0) - 1) local oframe = src.duration for count = 0, 9 do pat:split_frame(0, 0, num - 1, oframe, 1) end for idx = 0, 5 do local src = pat:get_frame(606, 0, idx) pat:update_frame(0, 0, num + idx, function(frame) copy_sprite(frame, src) frame.duration = 4 end) end local src = pat:get_frame(606, 1, 0) pat:update_frame(0, 0, num + 6, function(frame) frame.duration = 38 copy_sprite(frame, src) end) for idx = 7, 9 do local src = pat:get_frame(606, 2, idx - 7) pat:update_frame(0, 0, num + idx, function(frame) copy_sprite(frame, src) frame.duration = 4 end) end end return function(pat) mods.maketaunt(pat) -- mods.modifyj8aani(pat) mods.modifyCuntech(pat) -- mods.global(pat) mods.modifyspirits(pat) mods.modifymeleesword(pat) mods.modifyalt22box(pat) mods.modifyarmor6a(pat) mods.modify66b(pat) mods.sword_of_fate_bullet_properties(pat) mods.modifyswr_damage(pat) mods.idk(pat) mods.reduceBdamage(pat) mods.make_intense_slash(pat) if config:get("global", "4A/2A", "melty-style jabs") then mods.cancel(pat) end mods.modifypressureuntech(pat) -- mods.modify_superarmor_recovery(pat) mods.modify_j5a_untech(pat) mods.dial_a_untech(pat) mods.change_623_sky_attack(pat) mods.modifyj8auntech(pat) mods.sealrecovery(pat) mods.modify_3a_(pat) mods.dial_a_untech(pat) mods.modify_SWR_startup(pat) -- mods.modify_swordrang_recovery(pat) mods.modify_j2a_startup(pat) mods.modify_f5A_animation(pat) mods.modify_crush_untech(pat) mods.modifyj6auntech(pat) mods.modify4laser(pat) end