# Choose attack (+ attk cooldown)
scoreboard players set min rng 0
scoreboard players set max rng 4
# boost Needs a knight to be used
tag @s remove zeldian
execute if entity @e[tag=zeldian,tag=!zeldia_king,distance=..44,limit=1] run scoreboard players add max rng 1
tag @s add zeldian

function rng:interval

execute if score out rng matches 0..1 run tag @s add block
execute if score out rng matches 2 run tag @s add mKnights
execute if score out rng matches 3 run tag @s add mLeader
execute if score out rng matches 4 run tag @s add mMiner
execute if score out rng matches 5 run tag @s add boost

tag @s add attk_choosen
