execute at @s run kill @e[type=item,distance=..5]
execute at @s run setblock ~ ~ ~ chest[facing=east]{LootTable:"chests/cadeyrnlootchest1"}
execute at @s run setblock ~ ~1 ~ minecraft:player_head[rotation=4]{SkullOwner:"yomama"}
tag @a[tag=CadeyrnFightTag,tag=!ChestedCadeyrn,limit=1,sort=random] add ChestMeCadeyrn
execute at @s run execute as @p[tag=ChestMeCadeyrn,tag=!ChestedCadeyrn] run loot spawn ~ ~1 ~ loot minecraft:randomevents/player
tag @a[tag=ChestMeCadeyrn] add ChestedCadeyrn
tag @a remove ChestMeCadeyrn
execute at @s run data modify block ~ ~1 ~ SkullOwner set from entity @e[type=item,limit=1,sort=nearest,distance=..5] Item.tag.SkullOwner
execute at @s run kill @e[type=item,distance=..5]
execute at @s run tp @s ~ ~ ~2
#THIS IS THE CHEST'S KYUDUMMY, *NOT* THE CADEYRNFIGHT KYUDUMMY
scoreboard players add @s KyuDummy 1
execute at @s[scores={KyuDummy=9}] run tp @s ~ ~ ~-17
execute as @s[scores={KyuDummy=17}] run kill @s