execute as @e[type=witch,tag=jjc_enchanter] on passengers at @s[tag=jjc_nov] positioned ~ ~-2.3 ~ run data modify entity @s Rotation[0] set from entity @n[type=witch,tag=jjc_enchanter] Rotation[0]
execute as @e[type=witch,tag=jjc_enchanter] on passengers at @s[tag=jjc_nov] run tp @s ~ ~ ~ ~ 0

execute as @e[type=item_display,tag=jjc_enchanter_zs2] at @s positioned ~ ~-1.3 ~ run kill @n[type=item,nbt={Item:{id:"minecraft:lead",count:1}},distance=..12]
item replace entity @e[type=witch,tag=jjc_enchanter] weapon.mainhand with enchanted_book

execute as @e[type=witch,tag=jjc_enchanter] at @s on leasher run effect give @s[nbt=!{active_effects:[{id:"minecraft:strength"}]}] resistance 1 2
execute as @e[type=witch,tag=jjc_enchanter] at @s on leasher run effect give @s[nbt=!{active_effects:[{id:"minecraft:strength"}]}] strength 1 0
tag @e[type=#colosseum_of_fools:mob,tag=jjc_enchanter02] remove jjc_enchanter02
execute as @e[type=witch,tag=jjc_enchanter] at @s on leasher run tag @s add jjc_enchanter02
execute as @e[type=witch,tag=jjc_enchanter] at @s on leasher at @s run particle witch ~ ~1 ~ 0.5 0.5 0.5 0 5 force
execute if entity @e[type=#colosseum_of_fools:mob,tag=jjc_enchanter01,tag=!jjc_enchanter02] run function colosseum_of_fools:ss/witch/enchanter/3

execute as @e[type=witch,tag=jjc_enchanter,nbt=!{leash:{}}] at @s if entity @e[type=#colosseum_of_fools:mob,type=!#colosseum_of_fools:fly,tag=!jjc_enchanter,tag=jjc_mob,distance=0.01..10,nbt=!{active_effects:[{id:"minecraft:strength"}]}] run function colosseum_of_fools:ss/witch/enchanter/2

execute as @e[type=witch,tag=jjc_enchanter,nbt={OnGround:1b}] at @s facing entity @p[predicate=colosseum_of_fools:survive,tag=jjc_p,distance=..6] feet rotated ~180 0 unless block ^ ^-1 ^3 #colosseum_of_fools:no run summon marker ^ ^ ^0.01 {Tags:["jjc_wither_lord4m","jjc"]}
execute as @e[type=witch,tag=jjc_enchanter] at @s store result score @s jjc_x1 run data get entity @s Pos[0] 1000
execute as @e[type=witch,tag=jjc_enchanter] at @s store result score @s jjc_z1 run data get entity @s Pos[2] 1000
execute as @e[type=marker,tag=jjc_wither_lord4m] at @s store result score @s jjc_x2 run data get entity @s Pos[0] 1000
execute as @e[type=marker,tag=jjc_wither_lord4m] at @s store result score @s jjc_z2 run data get entity @s Pos[2] 1000
execute as @e[type=marker,tag=jjc_wither_lord4m] at @s store result entity @n[distance=..200,type=witch,tag=jjc_enchanter] Motion[0] double 0.012 run scoreboard players operation @s jjc_x2 -= @n[distance=..200,type=witch,tag=jjc_enchanter] jjc_x1
execute as @e[type=marker,tag=jjc_wither_lord4m] at @s store result entity @n[distance=..200,type=witch,tag=jjc_enchanter] Motion[2] double 0.012 run scoreboard players operation @s jjc_z2 -= @n[distance=..200,type=witch,tag=jjc_enchanter] jjc_z1
kill @e[type=marker,tag=jjc_wither_lord4m]

execute as @e[type=witch,tag=jjc_enchanter,predicate=!colosseum_of_fools:ss/speed0_2] on passengers run data merge entity @s[tag=jjc_enchanter_zs3] {transformation:{left_rotation:[0.3f,0f,0f,0.953f],translation:[0f,-1.74f,-0.78f]},start_interpolation:0,interpolation_duration:10}
execute as @e[type=witch,tag=jjc_enchanter,predicate=colosseum_of_fools:ss/speed0_2] on passengers run data merge entity @s[tag=jjc_enchanter_zs3] {transformation:{left_rotation:[0.044f,0f,0f,1f],translation:[0f,-1.9f,-0.25f]},start_interpolation:0,interpolation_duration:10}

execute if entity @e[type=item_display,tag=jjc_enchanter_zs2] run schedule function colosseum_of_fools:ss/witch/enchanter/1 1t replace