local mods = {} function mods.modifyBhitstop(pat) for frame = 0, 11 do pat:update_frame(800, 4, frame, { hitstop_enemy = 14, proration = 970, untech = 45 }) end end function mods.modify_j2a_startup(pat) for idx = 0, 1 do pat:update_frame(308, 0, idx, { duration = 2 }) end pat:update_frame(308, 4, 0, { untech = 60 }) for frame = 1, 2 do pat:update_frame(308, 1, frame, function(frame) frame.attackbox[1] = pat:get_frame(306, 0, 3).attackbox[1] frame.untech = 90 frame.hit_ani_air = 88 frame.hit_ani_ground = 88 frame.hit_sfx = 4 frame.proration = 800 frame.damage = 1000 frame.launch_vector_y = -2500 end) end for frame = 0, 1 do pat:update_frame(308, 4, frame, function(frame) frame.attackbox[1] = pat:get_frame(306, 0, 3).attackbox[1] frame.untech = 90 frame.hit_ani_air = 88 frame.hit_ani_ground = 88 frame.hit_sfx = 4 frame.launch_vector_y = -2500 end) end end function mods.rocketdive_damage_parameters(pat, damage, proration, limit) table.map({0,1,2,3}, function(off) pat:update_frame(505, 1, off, { damage = damage, proration = proration, limit = limit }) end) end function mods.rocketdive2_damage_parameters(pat, damage, proration, limit) table.map({0,1,2,3}, function(off) pat:update_frame(507, 1, off, { damage = damage, proration = proration, limit = limit }) end) end function mods.breaksun1_damage_parameters(pat, damage, proration, limit) for idx = 0, 1 do pat:update_frame(820, 0, idx, { damage = damage, proration = proration, limit = limit, untech = 9999 }) end end function mods.breaksun2_damage_parameters(pat, damage, proration, limit) for idx = 0, 1 do pat:update_frame(820, 1, idx, { damage = damage, proration = proration, limit = limit, untech = 9999, launch_vector_y = 0 }) end end function mods.breaksun3_damage_parameters(pat, damage, proration, limit) for idx = 0, 1 do pat:update_frame(820, 2, idx, { damage = damage, proration = proration, limit = limit, untech = 9999, launch_vector_y = 0 }) end end function mods.breaksun4_damage_parameters(pat, damage, proration, limit) for idx = 0, 1 do pat:update_frame(820, 7, idx, { untech = 9000 }) pat:update_frame(820, 7, idx, { damage = damage, proration = proration, limit = limit, untech = 9999, launch_vector_y = 0 }) end end function mods.creepsun1_damage_parameters(pat, damage, proration, limit) table.map({0,1}, function(off) pat:update_frame(855, 0, off, { damage = damage, proration = proration, limit = limit }) end) end function mods.creepsun2_damage_parameters(pat, damage, proration, limit) table.map({0,1}, function(off) pat:update_frame(855, 5, off, { damage = damage, proration = proration, limit = limit }) end) end function mods.untech_rocketdive_blast(pat) table.map({0,1}, function(off) pat:update_frame(811, 0, off, { untech = 9000 }) end) table.map({0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19}, function(off) pat:update_frame(811, 1, off, { untech = 9000 }) end) table.map({0,1}, function(off) pat:update_frame(811, 2, off, { untech = 9000 }) end) end function mods.fix_radiantblade(pat) for seq = 4, 6 do for idx = 0, 19 do pat:update_frame(817, seq, idx, { combo_correction = 2, hit_ani_ground = 74, hit_ani_air = 74, launch_vector_x = 2500, launch_vector_y = 1800, proration = 920, untech = 90, damage = 450 }) end end for idx = 0, 1 do table.map({530, 532, 533}, function (seq) pat:update_frame(seq, 4, idx, { duration = 1 }) end) end end function mods.modify_6c_damage(pat) for frame = 0, 1 do pat:update_frame(803, 1, 0, { damage = 120 }) end end function mods.modify_1card_startup(pat) for frame = 0, 3 do pat:update_frame(606, 2, frame, { duration = 2 }) end end function mods.modify_megaflare_startup(pat) pat:update_frame(650, 0, 0, { duration = 2 }) for frame = 3, 4 do pat:update_frame(650, 0, frame, { duration = 2 }) end for frame = 0, 29 do pat:update_frame(650, 2, frame, { duration = 2 }) end end function mods.modify_hightensionblade(pat) for idx = 0, 2 do pat:update_frame(608, 4, idx, { duration = 1 }) end for idx = 12, 15 do pat:update_frame(608, 0, idx, { duration = 1 }) end for idx = 0, 2 do pat:update_frame(608, 0, idx, { duration = 1 }) end for frame = 0, 7 do pat:update_frame(858, 3, frame, { hit_ani_ground = 74, hit_ani_air = 74, damage = 800, launch_vector_x = 2500, launch_vector_y = 1800, proration = 960, untech = 6000 }) end end function mods.reduce_10suns_damage(pat) for frame = 0, 1 do pat:update_frame(854, 0, frame, { damage = 225 }) end end function mods.modify4card(pat) for frame = 0, 1 do pat:update_frame(857, 3, frame, { damage = 950 }) pat:update_frame(857, 4, frame, { damage = 950 }) end end function mods.consistent_ucon(pat) for frame = 0, 3 do pat:update_frame(610, 1, frame, { hit_ani_air = 77, hit_ani_ground = 77, launch_vector_x = -3000, launch_vector_y = 1750, hitstop_enemy = 5 }) end end function mods.nerf_gigaflare(pat) for frame = 0, 13 do pat:update_frame(851, 10, frame, { proration = 850 }) end end function mods.modify_abyssnova_recovery(pat) for frame = 0, 3 do pat:update_frame(614, 0, frame, { duration = 1 }) end for frame = 14, 15 do pat:update_frame(614, 0, frame, { duration = 1 }) end for frame = 4, 13 do pat:update_frame(614, 0, frame, { duration = 2 }) 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(322, 0):set_priority(20, 30) pat:get_sequence(321, 0):set_priority(20, 20) for frame = 0, 19 do pat:update_frame(802, 0, frame, { untech = 70, damage = 350 }) end end function mods.dialAhitstop(pat) pat:update_frame(322, 0, 5, { hitstop_self = 0, untech = 68, launch_vector_x = 100, launch_vector_y = 2500, proration = 850 }) end function mods.j8a_untech(pat) pat:update_frame(309, 0, 3, { untech = 60 }) pat:update_frame(309, 0, 4, { untech = 60 }) end function mods.j6a_untech(pat) for frame = 0, 6 do pat:update_frame(307, 1, frame, { untech = 6000 }) end end function mods.addflareupDP(pat) for frame = 0, 1 do pat:update_frame(810, 4, frame, { launch_vector_x = 0 }) pat:update_frame(810, 0, frame, { launch_vector_x = 0 }) pat:update_frame(810, 6, frame, { launch_vector_x = 0 }) pat:update_frame(810, 5, frame, { launch_vector_x = 0 }) end end function mods.modify_pummelbox(pat) local function set_unsetbullshit(frame) unset_aflag(frame, 133617) end local function set_hitcrouch(frame) set_aflag(frame, 1) end -- pat:update_frame(510, 0, 4, set_unsetbullshit) -- pat:update_frame(511, 0, 4, set_unsetbullshit) -- pat:update_frame(510, 0, 4, set_hitcrouch) -- pat:update_frame(511, 0, 4, set_hitcrouch) for move = 510, 511 do pat:update_frame(move, 0, 4, function(frame) frame.attackbox[1] = { x1=-0, y1=-120, x2=120, y2=120 } end) pat:update_frame(move, 0, 14, function(frame) frame.duration = 10 end) pat:update_frame(510, 0, 0, function(frame) frame.duration = 5 end) pat:update_frame(511, 0, 0, function(frame) frame.duration = 2 end) end end function mods.modify22(pat) pat:update_frame(545, 2, 10, { duration = 40 }) pat:update_frame(545, 2, 6, { duration = 9 }) for frame = 0, 19 do pat:update_frame(821, 7, frame, { untech = 6000, launch_vector_y = 1500 }) end for frame = 0, 1 do for frme = 10, 11 do for fram = 13, 14 do pat:update_frame(821, frme, frame, function(frame) frame.untech = 6000 frame.launch_vector_y = 1500 end) pat:update_frame(821, fram, frame, function(frame) frame.untech = 6000 frame.launch_vector_y = 1500 end) end end end end function mods.modifyhellwavecannon(pat) for frame = 0, 9 do pat:update_frame(822, 2, frame, { untech = 6000, hitstop_enemy = 20 }) pat:update_frame(822, 3, frame, { untech = 6000, hitstop_enemy = 20 }) pat:update_frame(822, 4, frame, { untech = 6000, hitstop_enemy = 20 }) end for move = 550, 553 do pat:update_frame(move, 2, 5, function(frame) set_fflag(frame, FF_MOTION_CANCEL) end) pat:update_frame(move, 2, 10, { duration = 20 }) end end function mods.modifyshootingstar(pat) for move = 560, 563 do for frame = 0, 1 do pat:update_frame(move, 0, frame, function(frame) set_fflag(frame, FF_GRAZE) end) pat:update_frame(move, 1, frame, function(frame) --- to do: fix 0 to frame set_fflag(frame, FF_GRAZE) unset_fflag(frame, FF_CANCEL) set_fflag(frame, FF_MOTION_CANCEL) end) pat:update_frame(move, 2, frame, function(frame) set_fflag(frame, FF_GRAZE) set_fflag(frame, FF_MOTION_CANCEL) end) pat:update_frame(move, 3, frame, function(frame) set_fflag(frame, FF_MOTION_CANCEL) end) end end end function mods.modifysubsunsimulator(pat) for frame = 0, 14 do pat:update_frame(862, 0, frame, function(frame) unset_aflag(frame, AF_PROJECTILE) frame.scale_x = 1000 frame.scale_y = 1000 frame.hitstop_self = 0 set_aflag(frame, AF_CAN_HIT_SELF) frame.attackbox[1] = { x1=-12000, y1=-12000, x2=12000, y2=12000 } end) end end function mods.modifysubsun(pat) for frame = 0, 14 do pat:update_frame(862, 0, frame, function(frame) -- frame.scale_x = 540 frame.damage = 500 -- frame.scale_y = 540 -- frame.attackbox[1] = { x1=-360, y1=-360, x2=360, y2=360 } end) end for frame = 5, 21 do pat:remove_frame(612, 2, frame) pat:remove_frame(662, 2, frame) end for frame = 0, 5 do pat:remove_frame(612, 3, frame) pat:remove_frame(662, 3, frame) end end function mods.modify66c(pat) pat:get_sequence(418, 1):set_priority(50, 10) for frame = 0, 5 do pat:update_frame(418, 1, frame, function(frame) unset_fflag(frame, FF_CANCEL) end) end end function mods.modifynew5aaa(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 pat:split_frame(321, 0, 6, 2, 2) pat:split_frame(321, 0, 7, 2, 2) pat:split_frame(321, 0, 8, 2, 2) pat:split_frame(321, 0, 9, 2, 2) for idx = 0, 14 do local src = pat:get_frame(525, 0, idx) local boxes = pat:get_frame(525, 0, idx).hurtbox pat:update_frame(321, 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) 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 pat:split_frame(609, 0, 0, 2, 3) for idx = 0, 1 do local src = pat:get_frame(609, 4, 5) local boxes = pat:get_frame(609, 4, 5).hurtbox 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) end) end for idx = 2, 8 do local src = pat:get_frame(609, 0, idx) local boxes = pat:get_frame(609, 0, idx).hurtbox 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) end) local src = pat:get_frame(609, 0, 8) local boxes = pat:get_frame(609, 0, 8).hurtbox pat:update_frame(322, 0, 9, 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) end) end for idx = 10, 15 do local src = pat:get_frame(609, 4, (idx - 9)) local boxes = pat:get_frame(609, 4, (idx - 9)).hurtbox 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) end) end pat:remove_frame(609, 0, 0) pat:update_frame(609, 0, 0, { duration = 5}) end function mods.modifylol(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 local src = pat:get_frame(507, 1, 3) local boxes = pat:get_frame(507, 1, 3).hurtbox pat:update_frame(202, 0, 4, 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) end) for idx = 0, 3 do local src = pat:get_frame(507, 1, idx) local boxes = pat:get_frame(507, 1, idx).hurtbox pat:update_frame(202, 1, 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) end) local src = pat:get_frame(507, 0, 3) local boxes = pat:get_frame(507, 0, 3).hurtbox end for idx = 0, 1 do local src = pat:get_frame(507, 1, idx) local boxes = pat:get_frame(507, 1, idx).hurtbox pat:update_frame(202, 2, 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) end) local src = pat:get_frame(507, 0, 3) local boxes = pat:get_frame(507, 0, 3).hurtbox end end function mods.nerf(pat) for move = 300, 310 do for idx = 0, pat:get_frame_count(move, 0) - 1 do local src = pat:get_frame(move, 0, idx) local dmg = (src.damage - 20) pat:update_frame(move, 0, idx, function(frame) frame.damage = dmg end) end end for move = 320, 322 do for idx = 0, pat:get_frame_count(move, 0) - 1 do local src = pat:get_frame(move, 0, idx) local dmg = (src.damage - 20) pat:update_frame(move, 0, idx, function(frame) frame.damage = dmg end) end end for idx = 0, pat:get_frame_count(330, 0) - 1 do local src = pat:get_frame(330, 0, idx) local dmg = (src.damage - 20) pat:update_frame(330, 0, idx, function(frame) frame.damage = dmg end) end for idx = 0, pat:get_frame_count(307, 1) - 1 do local src = pat:get_frame(307, 1, idx) local dmg = (src.damage - 20) pat:update_frame(307, 1, idx, function(frame) frame.damage = dmg end) end end function mods.modifyfixed(pat) pat:update_frame(853, 2, 0, { untech = 6000 }) 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 local loop = 0 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 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, 16 do pat:split_frame(0, 0, num - 1, oframe, 1) end for idx = 0, 2 do local src = pat:get_frame(730, 0, idx) pat:update_frame(0, 0, num + idx, function(frame) copy_sprite(frame, src) frame.duration = src.duration end) end for idx = 3, 4 do local src = pat:get_frame(730, 1, idx - 3) pat:update_frame(0, 0, num + idx, function(frame) copy_sprite(frame, src) frame.duration = src.duration end) end for idx = 5, 7 do local src = pat:get_frame(730, 2, idx - 5) pat:update_frame(0, 0, num + idx, function(frame) copy_sprite(frame, src) frame.duration = src.duration end) end for idx = 8, 9 do local src = pat:get_frame(730, 3, idx - 8) pat:update_frame(0, 0, num + idx, function(frame) copy_sprite(frame, src) frame.duration = src.duration end) end for idx = 10, 16 do local src = pat:get_frame(730, 4, idx - 10) pat:update_frame(0, 0, num + idx, function(frame) copy_sprite(frame, src) frame.duration = src.duration end) end end return function(pat) mods.maketaunt(pat) mods.modifyfixed(pat) mods.nerf(pat) mods.modifylol(pat) mods.modifynew5aaaa(pat) mods.modifynew5aaa(pat) mods.modify66c(pat) mods.modifyshootingstar(pat) mods.modifysubsun(pat) -- mods.global(pat) mods.modifyhellwavecannon(pat) mods.modify22(pat) mods.modify_pummelbox(pat) mods.j6a_untech(pat) mods.j8a_untech(pat) mods.addflareupDP(pat) -- mods.dialAhitstop(pat) if config:get("global", "4A/2A", "melty-style jabs") then mods.cancel(pat) end mods.modify_abyssnova_recovery(pat) mods.modifyBhitstop(pat) mods.consistent_ucon(pat) mods.nerf_gigaflare(pat) mods.reduce_10suns_damage(pat) mods.modify4card(pat) mods.modify_hightensionblade(pat) mods.modify_megaflare_startup(pat) mods.modify_6c_damage(pat) mods.modify_1card_startup(pat) mods.fix_radiantblade(pat) mods.modify_j2a_startup(pat) mods.rocketdive_damage_parameters(pat, 1500, 500, 100) mods.rocketdive2_damage_parameters(pat, 1500, 500, 100) mods.untech_rocketdive_blast(pat) mods.breaksun1_damage_parameters(pat, 50, 1000, 0) mods.breaksun2_damage_parameters(pat, 50, 1000, 0) mods.breaksun3_damage_parameters(pat, 50, 1000, 0) mods.breaksun4_damage_parameters(pat, 50, 1000, 0) mods.creepsun1_damage_parameters(pat, 100, 1000, 2) mods.creepsun2_damage_parameters(pat, 100, 1000, 2) end