data merge entity @n[distance=..200,tag=jjc_dyjjc] {Tags:["jjc","jjc_jjc","jjc_dyjjc","jjc_kaishi","jjc_dyjjc_1"]}
function colosseum_of_fools:ks/dyjjc/start

execute as @n[distance=..200,tag=jjc_dyjjc_start1] at @s run playsound block.trial_spawner.detect_player block @a[distance=..200] ~ ~ ~ 4 1
execute as @n[distance=..200,tag=jjc_dyjjc_start1,tag=!jjc_om] at @s run particle trial_spawner_detection ~ ~ ~ 0.5 0.75 0.5 0 30 force
execute as @n[distance=..200,tag=jjc_dyjjc_start1,tag=jjc_om] at @s run particle trial_spawner_detection_ominous ~ ~ ~ 0.5 0.75 0.5 0 30 force
execute as @n[distance=..200,tag=jjc_dyjjc_start1,tag=jjc_om] at @s as @e[distance=..200,limit=2,sort=nearest,tag=jjc_dyjjc_start_zs] at @s run data merge entity @s {block_state:{Properties:{ominous:"true"}}}
execute as @n[distance=..200,tag=jjc_dyjjc_start1] at @s as @e[distance=..200,limit=2,sort=nearest,tag=jjc_dyjjc_start_zs] at @s run data merge entity @s {block_state:{Properties:{trial_spawner_state:"active",lit:"true"}}}
execute as @n[distance=..200,tag=jjc_dyjjc_start1] at @s as @e[distance=..200,limit=1,sort=nearest,tag=jjc_dyjjc_start_zs1] at @s run data merge entity @s {brightness:{block:15,sky:15}}

advancement revoke @s only colosseum_of_fools:trial/dyjjc/start1