-- sequence ids: -- 500 = [236] wind call -- 505 = [236] wave call -- 510 = [236] falling stars -- 520 = [22] omikuji bomb -- 525 = [22] sky serpent -- 530 = [22] cobalt spread -- 540 = [623] kanako: attack -- 545 = [623] kanako: wind -- 550 = [623] kanako: onbashira -- 560 = [214] suwako: shield -- 565 = [214] suwako: iron ring -- 570 = [214] suwako: trap -- 604 = sea split -- 815 = omikuji bomb -- 820 = kanako: attack -- 827 = suwako: trap -- 853 = random omikuji barrage -- 854 = sea split require("config.util") local mods = {} function mods.cancel_j2a(pat) table.map({{1,0},{1,1},{1,2},{2,0},{2,1}}, function(spec) local off, idx = table.unpack(spec) pat:update_frame(308, off, idx, function(frame) set_fflag(frame, FF_CANCEL) end) end) end function mods.heavy_da(pat) pat:update_frame(305, 0, 5, { hit_sfx = 3, hit_effect = 3, attack_level = 2 }) pat:update_frame(305, 0, 6, { duration = 6 }) pat:update_frame(305, 0, 8, { duration = 6 }) pat:update_frame(305, 0, 9, { duration = 6 }) end function mods.db_recovery(pat) pat:update_frame(408, 0, 11, { duration = 4 }) pat:update_frame(408, 0, 12, { duration = 3 }) end function mods.spawn_location_b_jb(pat, spawn_offset) local function spawn_template(index, offset) return function(frame) frame.extra1[index] = offset end end local function change(seq, spawn_location) for idx = 0, 3 do pat:update_frame(seq, 0, idx, spawn_location) end pat:update_frame(seq, 1, 0, spawn_location) end change(400, spawn_template(5, spawn_offset)) change(404, spawn_template(5, spawn_offset)) end function mods.b_bullet_damage_parameters(pat, proration, limit) pat:update_frame(800, 0, 0, { proration = proration, limit = limit, }) end function mods.wave_call_startup(pat) pat:update_frame(505, 0, 3, { duration = 3 }) pat:update_frame(506, 0, 3, { duration = 6 }) end function mods.iron_ring_sp_damage(pat, sp_damage) for idx = 0, 3 do pat:update_frame(826, 2, idx, function(frame) frame.sp_damage = sp_damage frame.hit_ani_ground = 0 frame.proration = 990 set_aflag(frame, AF_UNGRAZABLE) end) end end function mods.sky_serpent_create_c_version(pat) pat:remove_mapping(526) pat:remove_mapping(528) pat:copy_sequence(526, 525, 0) pat:copy_sequence(528, 527, 1) end function mods.sky_serpent_b_time_windows(pat) for seq = 525, 527, 2 do -- pat:update_frame(seq, 0, 3, { duration = 3 }) pat:update_frame(seq, 0, 6, { duration = 8 }) pat:update_frame(seq, 0, 7, { duration = 17 }) end end function mods.sky_serpent_c_time_windows(pat) for seq = 526, 528, 2 do pat:update_frame(seq, 0, 6, { duration = 12 }) end end function mods.cobalt_spread_hit_parameters(pat) pat:update_frame(817, 2, 0, { hit_ani_ground = 0, launch_vector_y = 1450 }) pat:update_frame(817, 7, 0, { hit_ani_ground = 0, launch_vector_y = 1450 }) end function mods.forgotten_ritual_startup(pat) pat:update_frame(602, 1, 16, { duration = 4 }) end return function(pat) if config:get("sanae", "j2a", "fast_cancel") then mods.cancel_j2a(pat) end if config:get("sanae", "da", "attack_level_heavy") then mods.heavy_da(pat) end mods.db_recovery(pat) mods.spawn_location_b_jb(pat, config:get("sanae", "b_series", "b_jb_spawn_x_offset")) if config:get("sanae", "b_series", "adjust_damage_parameters") then mods.b_bullet_damage_parameters(pat, 960, 5) end mods.wave_call_startup(pat) mods.iron_ring_sp_damage(pat, 25) if config:get("sanae", "sky_serpent", "modify_c_version") then mods.sky_serpent_create_c_version(pat) mods.sky_serpent_c_time_windows(pat) end mods.sky_serpent_b_time_windows(pat) mods.cobalt_spread_hit_parameters(pat) mods.forgotten_ritual_startup(pat) end