#Default Cages
execute as @e[type=marker,tag=cage] at @s run function subchronos:game/starting/cages/default


#~~~~~~~~~~~~~~~~~# Temp #~~~~~~~~~~~~~~~~~#
execute if score special_items option matches 1 if score op option matches 0 as @e[type=marker,tag=normalChest] at @s run setblock ~ ~ ~ barrel[facing=up]{LootTable:"subchronos:chest/special/normal/isla"}
execute if score special_items option matches 1 if score op option matches 1 as @e[type=marker,tag=normalChest] at @s run setblock ~ ~ ~ barrel[facing=up]{LootTable:"subchronos:chest/special/op/isla"}
execute if score special_items option matches 0 if score op option matches 0 as @e[type=marker,tag=normalChest] at @s run setblock ~ ~ ~ barrel[facing=up]{LootTable:"subchronos:chest/no_special/normal/isla"}
execute if score special_items option matches 0 if score op option matches 1 as @e[type=marker,tag=normalChest] at @s run setblock ~ ~ ~ barrel[facing=up]{LootTable:"subchronos:chest/no_special/op/isla"}

execute if score special_items option matches 1 if score op option matches 0 as @e[type=marker,tag=middleChest] at @s run setblock ~ ~ ~ barrel[facing=up]{LootTable:"subchronos:chest/special/normal/semimid"}
execute if score special_items option matches 1 if score op option matches 1 as @e[type=marker,tag=middleChest] at @s run setblock ~ ~ ~ barrel[facing=up]{LootTable:"subchronos:chest/special/op/semimid"}
execute if score special_items option matches 0 if score op option matches 0 as @e[type=marker,tag=middleChest] at @s run setblock ~ ~ ~ barrel[facing=up]{LootTable:"subchronos:chest/no_special/normal/semimid"}
execute if score special_items option matches 0 if score op option matches 1 as @e[type=marker,tag=middleChest] at @s run setblock ~ ~ ~ barrel[facing=up]{LootTable:"subchronos:chest/no_special/op/semimid"}

execute if score special_items option matches 1 if score op option matches 0 as @e[type=marker,tag=centralChest] at @s run setblock ~ ~ ~ barrel[facing=up]{LootTable:"subchronos:chest/special/normal/mid"}
execute if score special_items option matches 1 if score op option matches 1 as @e[type=marker,tag=centralChest] at @s run setblock ~ ~ ~ barrel[facing=up]{LootTable:"subchronos:chest/special/op/mid"}
execute if score special_items option matches 0 if score op option matches 0 as @e[type=marker,tag=centralChest] at @s run setblock ~ ~ ~ barrel[facing=up]{LootTable:"subchronos:chest/no_special/normal/mid"}
execute if score special_items option matches 0 if score op option matches 1 as @e[type=marker,tag=centralChest] at @s run setblock ~ ~ ~ barrel[facing=up]{LootTable:"subchronos:chest/no_special/op/mid"}


#If not explosion time removes markers
    execute if score time_explosion option matches 0 positioned 1000 0 1000 run kill @e[type=marker,tag=timedExplosion,distance=0..200]
#If not refill time removes markers
    execute if score barrel_refill option matches 0 positioned 1000 0 1000 run kill @e[type=marker,tag=chest,distance=0..200]