Show overlay upon player death

This commit is contained in:
Peter Stockings
2026-01-04 16:06:08 +11:00
parent bfe5ebae8c
commit 6a050ac7a9
4 changed files with 287 additions and 0 deletions

View File

@@ -134,5 +134,10 @@ export function stepUntilPlayerTurn(w: World, playerId: EntityId): { awaitingPla
const action = decideEnemyAction(w, actor, player);
events.push(...applyAction(w, actor.id, action));
// Check if player was killed by this action
if (!w.actors.has(playerId)) {
return { awaitingPlayerId: null as any, events };
}
}
}