# Mark chosen
tag @e[tag=ddiver_barrack,tag=!choosen,sort=nearest,limit=1] add choosen
function rng:percentage
execute if score out rng matches ..40 run tag @e[tag=ddiver_barrack,tag=!choosen,sort=nearest,limit=1] add choosen
execute if score out rng matches ..10 run tag @e[tag=ddiver_barrack,tag=!choosen,sort=nearest,limit=1] add choosen

# Summon
execute at @e[tag=ddiver_barrack,tag=choosen] run function bosses:drowned_diver/m_siren/call

# Clear
tag @e[tag=ddiver_barrack,tag=choosen] remove choosen
tag @s remove mSiren
tag @s remove attacking
