data modify entity @s Owner set from entity @n[distance=..200,type=wither_skeleton] UUID
execute positioned ~ ~0.3 ~ store result score @n[distance=..200,type=item_display,tag=jjc_wither_skull] jjc_damage run attribute @n[distance=..200,type=wither_skeleton] generic.attack_damage get 0.5
playsound entity.wither.shoot hostile @a[distance=..200] ~ ~ ~ 0.5 1
execute on origin on target run tag @s add jjc_t
execute positioned ~ ~1 ~ facing entity @p[distance=..200,predicate=colosseum_of_fools:survive,tag=jjc_p,tag=jjc_t] eyes run tp @s ~ ~-1 ~ ~ ~
execute positioned ~ ~0.3 ~ run data modify entity @n[distance=..200,type=item_display,tag=jjc_wither_skull,tag=!jjc_wither_wizard_zs] Rotation set from entity @s Rotation
execute at @s run summon marker ^ ^ ^0.02 {Tags:["jjc_wither_lord_j_m"]}
execute on origin on target run tag @s remove jjc_t
execute store result score @s jjc_x1 run data get entity @s Pos[0] 10000
execute store result score @s jjc_y1 run data get entity @s Pos[1] 10000
execute store result score @s jjc_z1 run data get entity @s Pos[2] 10000
execute as @n[distance=..200,type=marker,tag=jjc_wither_lord_j_m] at @s store result score @s jjc_x2 run data get entity @s Pos[0] 10000
execute as @n[distance=..200,type=marker,tag=jjc_wither_lord_j_m] at @s store result score @s jjc_y2 run data get entity @s Pos[1] 10000
execute as @n[distance=..200,type=marker,tag=jjc_wither_lord_j_m] at @s store result score @s jjc_z2 run data get entity @s Pos[2] 10000
scoreboard players operation @s jjc_x1 -= @n[distance=..200,type=marker,tag=jjc_wither_lord_j_m] jjc_x2
scoreboard players operation @s jjc_y1 -= @n[distance=..200,type=marker,tag=jjc_wither_lord_j_m] jjc_y2
scoreboard players operation @s jjc_z1 -= @n[distance=..200,type=marker,tag=jjc_wither_lord_j_m] jjc_z2
execute store result score @s jjc_random run random value -20..20
execute store result entity @n[distance=..200,type=potion,tag=jjc_wither_lord_j] Motion[0] double -0.01 run scoreboard players operation @s jjc_x1 += @s jjc_random
execute store result score @s jjc_random run random value -20..20
execute store result entity @n[distance=..200,type=potion,tag=jjc_wither_lord_j] Motion[1] double -0.01 run scoreboard players operation @s jjc_y1 += @s jjc_random
execute store result score @s jjc_random run random value -20..20
execute store result entity @n[distance=..200,type=potion,tag=jjc_wither_lord_j] Motion[2] double -0.01 run scoreboard players operation @s jjc_z1 += @s jjc_random
kill @n[distance=..200,type=marker,tag=jjc_wither_lord_j_m]