execute store result score %_mob dungeon run data get storage mob_room dic[0].Count
scoreboard players operation %_mob_type dungeon += %_mob dungeon

execute if score out rng <= %_mob_type dungeon run data modify entity @s Tags append from storage mob_room dic[0].tag.type
execute if score out rng <= %_mob_type dungeon run tag @s add filled

execute if entity @s[tag=!filled] run data remove storage mob_room dic[0]
execute unless data storage mob_room {dic:[]} if score %_mob_type dungeon matches ..100 if entity @s[tag=!filled] run function rooms:4_markers/enemies/fill_mob_loop
#execute if data storage mob_room {dic:[]} if score %_mob_type dungeon matches ..100 run say fill_mob_loop didn't get the entity
#execute if data storage mob_room {dic:[]} if score %_mob_type dungeon matches ..100 at @s run setblock ~ ~1 ~ dirt
