require("config.util") local mods = {} function mods.cancel(pat) -- pat:get_sequence(300, 0):set_priority(10, 10) -- 5A pat:get_sequence(320, 0):set_priority(10, 10) -- 5AA pat:get_sequence(303, 0):set_priority(10, 20) -- 2A -- pat:get_sequence(330, 0):set_priority(10, 10) -- 4A pat:get_sequence(321, 0):set_priority(10, 20) pat:get_sequence(322, 0):set_priority(20, 30) end function mods.j2a_untech(pat) pat:update_frame(308, 0, 4, { untech = 6000 }) pat:update_frame(309, 0, 4, { untech = 60}) end function mods.diala_untech(pat) pat:update_frame(322, 0, 6, { untech = 6000, hit_sfx = 8 }) pat:update_frame(321, 0, 3, function(frame) frame.attackbox[1] = pat:get_frame(321, 0, 8).attackbox[1] frame.attackbox[2] = pat:get_frame(321, 0, 8).attackbox[2] frame.attackbox[3] = pat:get_frame(321, 0, 8).attackbox[3] end) end function mods.lordwalkuntech(pat) pat:update_frame(500, 1, 0, { untech = 6000, proration = 900 }) pat:update_frame(501, 1, 0, { untech = 6000, proration = 900 }) pat:update_frame(501, 4, 0, { untech = 6000, proration = 900 }) end function mods.rekka_untech(pat) pat:update_frame(505, 2, 8, { untech = 6000 }) pat:update_frame(505, 3, 9, { launch_vector_x = 500, launch_vector_y = 1800, blockstop_self = 20, hitstop_self = 0, hitstop_enemy = 30, proration = 850 }) for frame = 10, 14 do pat:update_frame(505, 3, frame, { duration = 3 }) end end function mods.milleniumromans(pat) for frame = 0, 13 do pat:update_frame(608, 0, frame, { duration = 2 }) end end function mods.modifyCproration(pat) for frame = 0, 19 do pat:update_frame(801, 0, frame, { proration = 990, damage = 100 }) end for frame = 0, 19 do pat:update_frame(801, 2, frame, { proration = 990, damage = 100 }) end end function mods.modifyBhitstop(pat) pat:update_frame(800, 0, 0, { hitstop_enemy = 12, proration= 980 }) end function mods.chaingang_untech(pat) pat:update_frame(816, 5, 0, { untech = 60 }) pat:update_frame(816, 6, 0, { untech = 60 }) end function mods.cradle_untech(pat) for frame = 0, 3 do pat:update_frame(602, 2, frame, { untech = 6000, proration = 985 }) pat:update_frame(602, 3, frame, { untech = 6000, proration = 985 }) end for frame = 1, 2 do pat:update_frame(602, 0, frame, { duration = 1 }) end end function mods.badladystartup(pat) for frame = 0, 2 do pat:update_frame(606, 0, frame, { duration = 1 }) end for frame = 0, 7 do pat:update_frame(606, 1, frame, { duration = 1 }) end pat:update_frame(606, 3, 3, { duration = 10 }) end function mods.j5a_untech(pat) pat:update_frame(306, 0, 3, { untech = 30 }) end function mods.dp_untech(pat) for frame = 0, 3 do for move = 540, 541 do for seq = 2, 3 do pat:update_frame(move, seq, frame, { untech = 6000 }) end end end end function mods.makeupperlower(pat) for st = 0, 9 do pat:update_frame(821, 0, st, function(frame) frame.attackbox[1] = { x1=-130, y1=-50, x2=130, y2=50 } frame.hitstop_enemy = 25 frame.proration = 950 end) end for st = 0, 9 do pat:update_frame(821, 3, st, function(frame) frame.attackbox[1] = { x1=-130, y1=-50, x2=130, y2=50 } frame.hitstop_enemy = 25 frame.proration = 950 end) end for st = 0, 9 do pat:update_frame(821, 4, st, function(frame) frame.attackbox[1] = { x1=-130, y1=-50, x2=130, y2=50 } frame.hitstop_enemy = 25 frame.proration = 950 end) end end function mods.vampire_kiss(pat) for frame = 0, 4 do pat:update_frame(550, 0, frame, { duration = 2 }) pat:update_frame(550, 0, 1, { duration = 1 }) pat:update_frame(551, 0, frame, { duration = 5 }) end for frame = 5, 12 do pat:update_frame(551, 0, frame, { duration = 2 }) end pat:update_frame(550, 5, 3, { duration = 40 }) pat:update_frame(551, 5, 3, { duration = 40 }) end function mods.j6a_untech(pat) pat:update_frame(307, 0, 4, { untech = 6000 }) pat:update_frame(309, 0, 4, { untech = 60 }) end function mods.arrow(pat) pat:update_frame(560, 4, 0, { untech = 6000 }) pat:update_frame(561, 4, 0, { untech = 6000 }) pat:update_frame(565, 3, 0, { untech = 6000 }) pat:update_frame(566, 3, 0, { untech = 6000 }) pat:update_frame(826, 4, 0, { untech = 6000 }) pat:update_frame(826, 6, 0, { untech = 6000 }) end function mods.stigmatizer(pat) for frame = 0, 1 do pat:update_frame(827, 0, frame, { damage = 250, hitstop_self = 3, proration = 960, untech = 45 }) pat:update_frame(827, 5, frame, { damage = 250, hitstop_self = 3, proration = 960, untech = 45 }) end for frame = 12, 20 do pat:update_frame(570, 1, frame, function(frame) set_fflag(frame, FF_MOTION_CANCEL) end) pat:update_frame(571, 1, frame, function(frame) set_fflag(frame, FF_MOTION_CANCEL) end) end for frame = 0, 3 do pat:update_frame(570, 1, frame, function(frame) frame.duration = 1 end) pat:update_frame(571, 1, frame, function(frame) frame.duration = 1 end) end pat:update_frame(570, 1, 8, function(frame) frame.duration = 4 end) pat:update_frame(571, 1, 8, function(frame) frame.duration = 4 end) end function mods.modify_crosses(pat) for frame = 0, 9 do pat:update_frame(850, 0, frame, { untech = 6000 }) pat:update_frame(850, 1, frame, { untech = 6000 }) end end function mods.spears(pat) for frame = 0, 1 do pat:update_frame(851, 2, frame, { untech = 6000, hit_ani_air = 74, hit_ani_ground = 74, launch_vector_x = 2750, launch_vector_y = 1400 }) pat:update_frame(854, 2, frame, { untech = 6000 }) end end function mods.modifystretch(pat) pat:update_frame(609, 0, 6, { duration = 1 }) pat:update_frame(609, 2, 5, { duration = 30 }) pat:update_frame(609, 2, 2, function(frame) frame.launch_vector_x = 500 frame.launch_vector_y = -4000 frame.hit_ani_air = 88 frame.damage = 3500 frame.hit_ani_ground = 88 set_aflag(frame, AF_HIGHBLOCK_OK) set_aflag(frame, AF_AIR_BLOCKABLE) set_aflag(frame, AF_LOWBLOCK_OK) unset_aflag(frame, AF_GROUND_UNBLOCKABLE) end) end function mods.modifyj5aa(pat) pat:update_frame(325, 0, 1, {hit_ani_ground = 88, untech = 30}) end function mods.modifyB(pat) pat:update_frame(400, 0, 1, { duration = 2 }) end function mods.modifytrickster(pat) for move = 510, 511 do for frame = 0, 8 do pat:update_frame(move, 2, frame, function(frame) frame.launch_vector_x = 2500 end) end end end function mods.modifyB(pat) pat:update_frame(817, 0, 1, { untech = 9999 }) pat:update_frame(817, 0, 0, { untech = 9999 }) end function mods.modify3asprite(pat) for frame = 3, 4 do pat:update_frame(304, 0, frame, function(frame) frame.tex_h = 119 frame.tex_index = 95 frame.tex_offset_x = 118 frame.tex_offset_y = 219 frame.tex_w = 145 frame.tex_x = 0 frame.tex_y = 0 end) end for frame = 5, 6 do pat:update_frame(304, 0, frame, function(frame) frame.tex_h = 119 frame.tex_index = 96 frame.tex_offset_x = 118 frame.tex_offset_y = 219 frame.tex_w = 145 frame.tex_x = 0 frame.tex_y = 0 end) end for frame = 7, 8 do pat:update_frame(304, 0, frame, function(frame) frame.tex_h = 119 frame.tex_index = 97 frame.tex_offset_x = 118 frame.tex_offset_y = 219 frame.tex_w = 145 frame.tex_x = 0 frame.tex_y = 0 end) end for frame = 9, 10 do pat:update_frame(304, 0, frame, function(frame) frame.tex_h = 119 frame.tex_index = 98 frame.tex_offset_x = 118 frame.tex_offset_y = 219 frame.tex_w = 145 frame.tex_x = 0 frame.tex_y = 0 end) end for frame = 8, 11 do pat:update_frame(505, 3, frame, function(frame) -- show_message_box(table.tostring(frame)) end) end end function mods.modifynew5aaaa(pat) local function remove_last_hurtbox(frame) table.remove(frame.hurtbox) end -- for frame = 10, 12 do -- pat:remove_frame(304, 0, 10) -- end -- for frame = 6, 8 do -- pat:remove_frame(304, 1, 6) -- end for idx = 2, 9 do local src = pat:get_frame(505, 2, (idx + 2)) local boxes = pat:get_frame(505, 2, (idx + 2)).hurtbox local box = pat:get_frame(505, 2, (idx + 2)).attackbox pat:update_frame(322, 0, idx, function(frame) -- frame.attackbox[2] = { x1= 30, y1= 30, x2= 40, y2= 50 } -- frame.attackbox[3] = { x1= 10, y1= 10, x2= 60, y2= 90 } copy_sprite(frame, src) frame.hurtbox = table.map(boxes, table.shallow_copy) -- frame.attackbox = table.map(box, table.shallow_copy) end) end for idx = 10, 12 do local src = pat:get_frame(505, 2, 10) local boxes = pat:get_frame(505, 2, 10).hurtbox local box = pat:get_frame(505, 2, 10).attackbox pat:update_frame(322, 0, idx, function(frame) -- frame.attackbox[2] = { x1= 30, y1= 30, x2= 40, y2= 50 } -- frame.attackbox[3] = { x1= 10, y1= 10, x2= 60, y2= 90 } copy_sprite(frame, src) frame.hurtbox = table.map(boxes, table.shallow_copy) -- frame.attackbox = table.map(box, table.shallow_copy) end) end for idx = 13, 15 do local src = pat:get_frame(505, 2, (idx - 2)) local boxes = pat:get_frame(505, 2, (idx - 2)).hurtbox local box = pat:get_frame(505, 2, (idx - 2)).attackbox pat:update_frame(322, 0, idx, function(frame) -- frame.attackbox[2] = { x1= 30, y1= 30, x2= 40, y2= 50 } -- frame.attackbox[3] = { x1= 10, y1= 10, x2= 60, y2= 90 } copy_sprite(frame, src) frame.hurtbox = table.map(boxes, table.shallow_copy) -- frame.attackbox = table.map(box, 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, 9 do local src = pat:get_frame(731, 4, idx) pat:update_frame(0, 0, num + idx, function(frame) copy_sprite(frame, src) frame.duration = src.duration end) pat:update_frame(0, 0, num + 4, function(frame) frame.duration = 30 end) end end return function(pat) mods.maketaunt(pat) mods.modifynew5aaaa(pat) mods.modify3asprite(pat) mods.modifytrickster(pat) mods.modifyB(pat) mods.modifyj5aa(pat) mods.spears(pat) mods.modifystretch(pat) mods.modify_crosses(pat) mods.stigmatizer(pat) mods.arrow(pat) mods.j6a_untech(pat) mods.vampire_kiss(pat) mods.makeupperlower(pat) mods.j5a_untech(pat) mods.j2a_untech(pat) if config:get("global", "4A/2A", "melty-style jabs") then mods.cancel(pat) end mods.diala_untech(pat) mods.rekka_untech(pat) mods.lordwalkuntech(pat) mods.milleniumromans(pat) mods.modifyBhitstop(pat) mods.chaingang_untech(pat) mods.cradle_untech(pat) mods.modifyCproration(pat) mods.cradle_untech(pat) -- mods.badladystartup(pat) mods.dp_untech(pat) end