#cooldown
function main:settings/stats/cooldown/calculation {"cooldown":4,"type":shift}
scoreboard players set @s shift_duration_t 20
scoreboard players add .mana sorcerer 20
scoreboard players add @s double_jump 1
tag @s add sorcerer_shift

# execute unless entity @e[type=block_display,tag=id1_sorcerer_shift_projectile] at @s anchored eyes run function main:mechanics/projectile/projectile {"id":id1,"character":sorcerer,"type":shift,"distance":2,"texture":"minecraft:barrier","size":"0.5f,0.5f,0.5f","translation":"-0.1f,-0.2f,-0.1f","x":"~","y":"~","angle_1":"~","angle_2":"~","pierce":1}

execute at @s run function main:mechanics/raycast/raycast {"radius":"~ ~-0.15 ~ 1 1 1 25 1 force","id":id1,"particle_1":portal,"particle_2":"dust{color:[1,0,1],scale:0.5}","distance":100,"type":shift,"positioned":"positioned ~-0.5 ~-0.5 ~-0.5 as @e[type=#main:enemies,tag=enemy,dx=0,limit=1]","character":sorcerer,"x":"~","y":"~","offset":"","offset_2":"","pierce":1}

playsound entity.player.attack.sweep master @a ~ ~ ~ 3 2