execute as @e[type=block_display,tag=jjc_oblb0] at @s run data modify entity @s Rotation set from entity @n[distance=..200,type=ghast,tag=jjc_oblb] Rotation
# execute if entity @e[type=ghast,tag=jjc_oblb_s] run function colosseum_of_fools:ss/ghast/oblobble/2

execute as @e[type=ghast,tag=jjc_oblb,predicate=colosseum_of_fools:ss/target] at @s anchored eyes positioned ^ ^ ^ as @n[type=fireball,tag=!jjc_oblb_j_dectected,distance=..5] at @s on origin run tag @s[type=ghast,tag=jjc_oblb,predicate=colosseum_of_fools:ss/target] add jjc_oblb_shoot1
execute if entity @e[type=ghast,tag=jjc_oblb,tag=jjc_oblb_shoot1] run function colosseum_of_fools:ss/ghast/oblobble/2
execute as @e[type=ghast,tag=jjc_oblb,predicate=colosseum_of_fools:ss/target] at @s anchored eyes positioned ^ ^ ^ run tag @n[type=fireball,tag=!jjc_oblb_j_dectected,distance=..5] add jjc_oblb_j_dectected

execute if entity @e[type=marker,tag=jjc_oblb1,predicate=colosseum_of_fools:nov] run function colosseum_of_fools:ss/ghast/oblobble/rage

execute as @e[type=marker,tag=jjc_oblb1,predicate=colosseum_of_fools:nov] at @s run tag @e[type=ghast,tag=jjc_oblb,distance=..48] add jjc_oblb_rage
scoreboard players add @e[type=ghast,tag=jjc_oblb] jjc_303 1
scoreboard players add @e[type=ghast,tag=jjc_oblb_rage] jjc_303 1
scoreboard players add @e[type=ghast,tag=jjc_oblb,scores={jjc_303=1..80}] jjc_404 1
scoreboard players add @e[type=ghast,tag=jjc_oblb_rage,scores={jjc_303=1..80}] jjc_404 1

execute as @e[type=ghast,tag=jjc_oblb,scores={jjc_303=2..20}] at @s positioned ~ ~3.5 ~ run data merge entity @n[distance=..200,type=block_display,tag=jjc_oblb0] {block_state:{Properties:{trial_spawner_state:"active"}},brightness:{block:15,sky:15}}
execute as @e[type=ghast,tag=jjc_oblb,scores={jjc_303=2}] at @s run playsound entity.ghast.warn hostile @a[distance=..200] ~ ~1 ~ 1 1.2

execute if entity @e[type=ghast,tag=jjc_oblb,scores={jjc_404=10..}] run function colosseum_of_fools:ss/ghast/oblobble/4

execute as @e[type=ghast,tag=jjc_oblb,scores={jjc_303=82..100}] at @s positioned ~ ~3.5 ~ run data merge entity @n[distance=..200,type=block_display,tag=jjc_oblb0] {block_state:{Properties:{trial_spawner_state:"cooldown"}}}
execute as @e[type=ghast,tag=jjc_oblb,scores={jjc_303=82..100}] at @s positioned ~ ~3.5 ~ run data remove entity @n[distance=..200,type=block_display,tag=jjc_oblb0] brightness
execute as @e[type=ghast,tag=jjc_oblb,scores={jjc_303=160..}] at @s store result score @s jjc_303 run random value -20..20