# ---- Dead players ----
execute if entity @a[tag=dead] run tellraw @a ["",{"text":"[!] ","color":"gold","bold":true},{"translate":"msg.warp.revive","color":"gray","bold":false}]
execute as @a[tag=dead] run gamemode adventure
tag @a remove dead

# --- Warp ---
tp @a 6 52 0
effect give @a instant_health 1 10
playsound custom.player.tp ambient @a

kill @e[tag=EB]

# --- Reset ---
function game:music/stop

scoreboard players set game state 0
scoreboard players set generation state 0
scoreboard players add floor dungeon 1

execute if score floor dungeon matches 4.. run function game:room/6_room_completed/warp/run_end

execute if entity @s[tag=!tutorial_obj] unless score floor dungeon matches 4 run function lobby:generate/main
execute if score floor dungeon matches 4 run scoreboard players set floor dungeon 1
execute if score tutorial state matches 0 run scoreboard players set tutorial state 1

execute as @a run function effects:player_clear

function lobby:reset
