execute as @e[type=illusioner,tag=jjc_illusioner,nbt={SpellTicks:1},predicate=colosseum_of_fools:ss/player] at @s run effect clear @a[distance=..60] blindness
execute as @e[type=illusioner,tag=jjc_illusioner,nbt={SpellTicks:1},predicate=colosseum_of_fools:ss/player] at @s run effect give @a[predicate=colosseum_of_fools:survive,tag=jjc_p,distance=..60] blindness 2
execute as @e[type=illusioner,tag=jjc_illusioner_1,nbt={SpellTicks:1}] at @s run function colosseum_of_fools:ss/illusioner/2
execute as @e[type=illusioner,tag=jjc_illusioner_bt,nbt={HurtTime:9s},predicate=colosseum_of_fools:ss/target] at @s run particle dragon_breath ~ ~1 ~ 0.25 0.5 0.25 0.1 30 normal
execute as @e[type=illusioner,tag=jjc_illusioner_tp] at @s summon marker run function colosseum_of_fools:ss/illusioner/chorus/1
execute as @e[type=illusioner,tag=jjc_illusioner_tp] at @s summon marker run function colosseum_of_fools:ss/illusioner/chorus/1

execute as @e[type=illusioner,tag=jjc_illusioner_fs,predicate=colosseum_of_fools:random/0.1] at @s unless entity @e[type=illusioner,tag=jjc_illusioner_bt,distance=..60] run damage @s 1 generic_kill
execute as @e[type=illusioner,tag=jjc_illusioner,predicate=colosseum_of_fools:ss/target] at @s anchored eyes positioned ^ ^ ^ as @n[type=arrow,tag=!jjc_illusioner_j_detected,distance=..2,nbt=!{LeftOwner:1b,inGround:0b}] at @s on origin at @s[type=illusioner,predicate=colosseum_of_fools:ss/target] run tag @s add jjc_illusioner_shoot
execute as @e[type=illusioner,tag=jjc_illusioner_shoot,nbt={HandItems:[{id:"minecraft:bow"}]}] at @s run data remove entity @s HandItems[0]
scoreboard players add @e[type=illusioner,tag=jjc_illusioner_shoot] jjc_303 1
execute as @e[type=illusioner,tag=jjc_illusioner_shoot,scores={jjc_303=60..}] at @s run data modify entity @s HandItems[0] set value {id:"minecraft:bow"}
tag @e[type=illusioner,tag=jjc_illusioner_shoot,scores={jjc_303=60..}] remove jjc_illusioner_shoot
scoreboard players reset @e[type=illusioner,scores={jjc_303=60..}] jjc_303
execute as @e[type=illusioner,tag=jjc_illusioner_fs,predicate=colosseum_of_fools:ss/target] at @s anchored eyes positioned ^ ^ ^ as @n[type=arrow,tag=!jjc_illusioner_j_detected,distance=..2,nbt=!{LeftOwner:1b,inGround:0b}] at @s on origin at @s[type=illusioner,tag=jjc_illusioner_fs,predicate=colosseum_of_fools:ss/target] anchored eyes positioned ^ ^ ^ as @n[type=arrow,tag=!jjc_illusioner_j_detected,distance=..2,nbt=!{LeftOwner:1b,inGround:0b}] at @s run data merge entity @s {damage:1d}
execute as @e[type=illusioner,tag=jjc_illusioner,predicate=colosseum_of_fools:ss/target] at @s anchored eyes positioned ^ ^ ^ as @n[type=arrow,tag=!jjc_illusioner_j_detected,distance=..2,nbt=!{LeftOwner:1b,inGround:0b}] at @s on origin at @s[type=illusioner,tag=jjc_illusioner_bt,predicate=colosseum_of_fools:ss/target] anchored eyes positioned ^ ^ ^ as @n[type=arrow,tag=!jjc_illusioner_j_detected,distance=..2,nbt=!{LeftOwner:1b,inGround:0b}] at @s run function colosseum_of_fools:ss/illusioner/j
execute as @e[type=illusioner,tag=jjc_illusioner,predicate=colosseum_of_fools:ss/target] at @s anchored eyes positioned ^ ^ ^ run tag @n[type=arrow,tag=!jjc_illusioner_j_detected,distance=..2,nbt=!{LeftOwner:1b,inGround:0b}] add jjc_illusioner_j_detected

execute as @e[type=arrow,tag=jjc_illusioner_j] at @s run particle flash
execute as @e[type=arrow,tag=jjc_illusioner_j] at @s run particle dust{color:[0.6,0.0,0.8],scale:1} ~ ~ ~ 0.0625 0.0625 0.0625 1 2
kill @e[type=arrow,tag=jjc_illusioner_j,nbt={inGround:1b}]
execute as @e[type=marker,tag=jjc_illusioner_j_m,predicate=colosseum_of_fools:nov] at @s run summon firework_rocket ~ ~-0.6 ~ {FireworksItem:{components:{"minecraft:fireworks":{explosions:[{colors:[I;8073150],shape:"small_ball"},{colors:[I;2437522],shape:"small_ball"}],flight_duration:1b}},count:64,id:"minecraft:firework_rocket"},Life:1,LifeTime:0}
execute as @e[type=marker,tag=jjc_illusioner_j_m,predicate=colosseum_of_fools:nov] at @s positioned ~ ~-0.6 ~ as @e[nbt={attributes:[{}]},distance=..3,type=!armor_stand,type=!#raiders] at @s run function colosseum_of_fools:ss/illusioner/1d
execute as @e[type=marker,tag=jjc_illusioner_j_m,predicate=colosseum_of_fools:nov] at @s run playsound entity.firework_rocket.large_blast block @a[distance=..200] ~ ~-0.6 ~ 2 1
execute as @e[type=marker,tag=jjc_illusioner_j_m,predicate=colosseum_of_fools:nov] at @s run playsound entity.firework_rocket.twinkle_far block @a[distance=..200] ~ ~-0.6 ~ 2 1

tag @e[type=illusioner,tag=jjc_illusioner_1,predicate=!colosseum_of_fools:ss/target] remove jjc_illusioner_1
tag @e[type=illusioner,tag=jjc_illusioner_bt,nbt={SpellTicks:1,active_effects:[{id:"minecraft:invisibility"}]}] add jjc_illusioner_1
effect clear @e[type=illusioner,tag=jjc_illusioner_1] invisibility
tag @e[type=illusioner,tag=jjc_illusioner_fs_1,predicate=!colosseum_of_fools:ss/target] remove jjc_illusioner_fs_1
tag @e[type=illusioner,tag=jjc_illusioner_fs,nbt={SpellTicks:1,active_effects:[{id:"minecraft:invisibility"}]}] add jjc_illusioner_fs_1
scoreboard players add @e[type=illusioner,tag=jjc_illusioner_fs_1] jjc_404 1
execute as @e[type=illusioner,tag=jjc_illusioner_fs_1,scores={jjc_404=40..}] at @s run data merge entity @s {Silent:0b}
effect clear @e[type=illusioner,tag=jjc_illusioner_fs_1] invisibility

execute as @e[type=illusioner,tag=jjc_illusioner_fs,nbt={active_effects:[{id:"minecraft:luck"}]},predicate=!colosseum_of_fools:ss/player] at @s run damage @s 0.1 generic by @p[predicate=colosseum_of_fools:survive,tag=jjc_p,distance=..60]
tag @e[type=illusioner,tag=jjc_illusioner_fs,nbt={HurtTime:9s},nbt=!{active_effects:[{id:"minecraft:luck"}]}] add jjc_illusioner_fs_kill
execute as @e[type=illusioner,tag=jjc_illusioner_fs_kill] at @s run playsound entity.illusioner.death hostile @a[distance=..200] ~ ~1 ~ 1 1.2
execute as @e[type=illusioner,tag=jjc_illusioner_fs_kill] at @s run playsound entity.illusioner.mirror_move hostile @a[distance=..200] ~ ~1 ~ 1 1
execute as @e[type=illusioner,tag=jjc_illusioner_fs_kill] at @s run particle dragon_breath ~ ~1 ~ 0.25 0.5 0.25 0.1 30 normal
execute as @e[type=illusioner,tag=jjc_illusioner_fs_kill] at @s run tp @s ~ ~-1000 ~