scoreboard players add @e[type=cave_spider,tag=jjc_brooding_spider,predicate=colosseum_of_fools:ss/player,tag=!jjc_brooding_spider3,tag=!jjc_brooding_spider4] jjc_303 1

tag @e[type=cave_spider,tag=jjc_brooding_spider,scores={jjc_303=100..},predicate=colosseum_of_fools:random/0.5] add jjc_brooding_spider3
tag @e[type=cave_spider,tag=jjc_brooding_spider,scores={jjc_303=100..},tag=!jjc_brooding_spider3] add jjc_brooding_spider4

execute as @e[type=cave_spider,tag=jjc_brooding_spider,scores={jjc_303=100..}] at @s store result score @s jjc_303 run random value -40..40

execute if entity @e[type=cave_spider,tag=jjc_brooding_spider3] run function colosseum_of_fools:ss/brooding_spider/3
execute if entity @e[type=cave_spider,tag=jjc_brooding_spider4] run function colosseum_of_fools:ss/brooding_spider/4

scoreboard players add @e[type=cave_spider,tag=jjc_brooding_spider,predicate=colosseum_of_fools:ss/player,tag=!jjc_brooding_spider3,tag=!jjc_brooding_spider4] jjc_404 1
execute if entity @e[type=cave_spider,tag=jjc_brooding_spider,scores={jjc_404=10..}] run function colosseum_of_fools:ss/brooding_spider/2
execute as @e[type=arrow,tag=jjc_brooding_spider_j2,nbt={inGround:1b}] at @s as @e[nbt={attributes:[{}]},distance=..2.5,type=!#colosseum_of_fools:spider] at @s run function colosseum_of_fools:ss/brooding_spider/2d
execute as @e[type=arrow,tag=jjc_brooding_spider_j2,nbt={inGround:1b}] at @s run particle explosion ~ ~ ~ 0 0 0 0 1 force
execute as @e[type=arrow,tag=jjc_brooding_spider_j2,nbt={inGround:1b}] at @s run particle entity_effect{color:[0.0,0.6,0.0,1.0]} ~ ~-0.5 ~ 0.5 0 0.5 0.5 50 force
kill @e[type=arrow,tag=jjc_brooding_spider_j2,nbt={inGround:1b}]

execute if entity @e[type=arrow,tag=jjc_brooding_spider_j0] run function colosseum_of_fools:ss/brooding_spider/j0