particle squid_ink ~ ~.2 ~ -.4 -.4 -.4 0 5

#Void Pull
execute as @e[type=!player,distance=..16,tag=!unspellable] at @s run tp @s ~ ~ ~ facing entity @e[tag=void_tear,limit=1,sort=nearest,tag=obj]
execute as @e[type=!player,distance=..16,tag=!unspellable] at @s run function items:obj/void_tear/pull

# Effect on Mob
execute positioned ~ ~-.7 ~ as @e[type=!player,distance=..0.7,tag=!unspellable,tag=!boss] run function items:obj/void_tear/effect/on_mob

# Effect on Boss
execute unless score @s countdown2 matches ..0 unless score @s countdown2 matches 0.. run scoreboard players set @s countdown2 17
execute if score @s countdown2 matches 0 positioned ~ ~-.7 ~ run scoreboard players add @e[type=!player,distance=..0.7,tag=boss,tag=!unspellable] damage 130

# Sound not to play multiple tiems
execute positioned ~ ~-.7 ~ if entity @e[type=!player,distance=..0.7,tag=!unspellable,limit=1,tag=!boss] run playsound custom.void_tear.suck ambient @a ~ ~ ~
execute if score @s countdown2 matches 0 positioned ~ ~-.7 ~ as @e[type=!player,distance=..0.7,tag=boss,tag=!unspellable,limit=1] run playsound custom.void_tear.suck ambient @a ~ ~ ~
