execute as @e[type=wither_skeleton,tag=jjc_wither_lord,tag=!jjc_wither_lord1,tag=!jjc_wither_lord2,tag=!jjc_wither_lord3,tag=!jjc_wither_lord4] at @s if entity @n[predicate=colosseum_of_fools:survive,tag=jjc_p,distance=..60] run scoreboard players add @s jjc_303 1

execute as @e[type=wither_skeleton,tag=jjc_wither_lord,scores={jjc_303=40}] at @s if entity @n[predicate=colosseum_of_fools:survive,tag=jjc_p,distance=..60] unless entity @n[predicate=colosseum_of_fools:survive,tag=jjc_p,distance=..10] run scoreboard players set @s jjc_random 3
execute as @e[type=wither_skeleton,tag=jjc_wither_lord,scores={jjc_303=40}] at @s if entity @n[predicate=colosseum_of_fools:survive,tag=jjc_p,distance=..8] store result score @s jjc_random run random value 1..2

execute as @e[type=wither_skeleton,tag=jjc_wither_lord,nbt={HurtTime:9s}] at @s store result score @s jjc_hp run data get entity @s Health 100
scoreboard players set @e[type=wither_skeleton,tag=jjc_wither_lord,scores={jjc_303=40,jjc_hp=..5000},nbt={OnGround:1b},predicate=colosseum_of_fools:random/0.2] jjc_random 4

tag @e[type=wither_skeleton,tag=jjc_wither_lord,scores={jjc_303=40,jjc_random=1}] add jjc_wither_lord1
tag @e[type=wither_skeleton,tag=jjc_wither_lord,scores={jjc_303=40,jjc_random=2}] add jjc_wither_lord2
tag @e[type=wither_skeleton,tag=jjc_wither_lord,scores={jjc_303=40,jjc_random=3}] add jjc_wither_lord3
tag @e[type=wither_skeleton,tag=jjc_wither_lord,scores={jjc_303=40,jjc_random=4}] add jjc_wither_lord4
execute as @e[type=wither_skeleton,tag=jjc_wither_lord,scores={jjc_303=40..}] at @s store result score @s jjc_303 run random value 0..20

execute if entity @e[type=wither_skeleton,tag=jjc_wither_lord,tag=jjc_wither_lord1] run function colosseum_of_fools:ss/wither_skeleton/wither_lord/1
execute if entity @e[type=wither_skeleton,tag=jjc_wither_lord,tag=jjc_wither_lord2] run function colosseum_of_fools:ss/wither_skeleton/wither_lord/2
execute if entity @e[type=wither_skeleton,tag=jjc_wither_lord,tag=jjc_wither_lord3] run function colosseum_of_fools:ss/wither_skeleton/wither_lord/3
execute if entity @e[type=wither_skeleton,tag=jjc_wither_lord,tag=jjc_wither_lord4] run function colosseum_of_fools:ss/wither_skeleton/wither_lord/4

execute as @e[type=wither_skeleton,tag=jjc_wither_lord,predicate=colosseum_of_fools:random/0.5] at @s run particle smoke ~ ~1.5 ~ 0.5 0.1 0.5 0.05 1

execute as @e[type=wither_skeleton,tag=jjc_wither_lord] at @s store result score @s jjc_y0 run data get entity @s Pos[1] 10
execute as @e[type=wither_skeleton,tag=jjc_wither_lord] at @s if score @s jjc_y0 < @n[type=marker,tag=jjc_jjc,distance=..40] jjc_y0 run tag @s add jjc_wither_lord1
execute as @e[type=wither_skeleton,tag=jjc_wither_lord,predicate=!colosseum_of_fools:ss/player] at @s if score @s jjc_y0 < @n[type=marker,tag=jjc_jjc,distance=..40] jjc_y0 run tp @n[type=marker,tag=jjc_jjc,distance=..40]

execute if entity @e[type=armor_stand,tag=jjc_wither_lord4_j] run function colosseum_of_fools:ss/wither_skeleton/wither_lord/40

execute as @e[type=wither_skeleton,tag=jjc_wither_lord,predicate=!colosseum_of_fools:ss/speed0_2] on passengers run data merge entity @s[tag=jjc_cape] {transformation:{left_rotation:[0.3f,0f,0f,0.953f],translation:[0f,-2.5f,-1.4f]},start_interpolation:0,interpolation_duration:10}
execute as @e[type=wither_skeleton,tag=jjc_wither_lord,predicate=colosseum_of_fools:ss/speed0_2] on passengers run data merge entity @s[tag=jjc_cape] {transformation:{left_rotation:[0.044f,0f,0f,1f],translation:[0f,-2.8f,-0.48f]},start_interpolation:0,interpolation_duration:10}
execute as @e[type=wither_skeleton,tag=jjc_wither_lord] at @s on passengers run data modify entity @s[tag=jjc_nov] Rotation[0] set from entity @n[distance=..200,type=wither_skeleton,tag=jjc_wither_lord] Rotation[0]
execute as @e[type=wither_skeleton,tag=jjc_wither_lord] on passengers at @s[tag=jjc_nov] run tp @s ~ ~ ~ ~ 0