# Game Over
execute as @s[tag=!dead,scores={Death=1}] run function game:death/trigger

# Mark rooms with has player
execute if entity @s[tag=!dead] run tag @e[type=marker,tag=center,sort=nearest,limit=1] add has_player

# Dead players
execute if entity @s[tag=dead] unless entity @a[tag=!dead,distance=..12,limit=1] run tp @s @a[tag=!dead,sort=nearest,limit=1]

xp set @s[tag=!dead] 0 levels
xp set @s[tag=!dead] 0 points

execute if score floor dungeon matches 3 if predicate entity/in_water run effect give @s water_breathing 1 0 true
