execute store result score .dialog death run random value 1..2
execute if score .dialog death matches 1 run return fail

execute if entity @e[type=item,tag=orange_artifact] run return run function main:dialog/id/room/artifact/rarity/orange/random
execute if entity @e[type=item,tag=purple_artifact] run return run function main:dialog/id/room/artifact/rarity/purple/random
execute if entity @e[type=item,tag=blue_artifact] run return run function main:dialog/id/room/artifact/rarity/blue/random
execute if entity @e[type=item,tag=green_artifact] run return run function main:dialog/id/room/artifact/rarity/green/random