From 2a1bffe7e3d18b06f3c4139f7014494420912a3b Mon Sep 17 00:00:00 2001 From: xangelo Date: Wed, 16 Aug 2023 14:30:59 -0400 Subject: [PATCH] fix: dont display death text after fleeing The check now validates that the player has ACTUALLY died before displaying that they died on the front end. --- src/server/views/fight.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/server/views/fight.ts b/src/server/views/fight.ts index 1995d9a..4663c62 100644 --- a/src/server/views/fight.ts +++ b/src/server/views/fight.ts @@ -19,8 +19,9 @@ export function renderRoundDetails(roundData: FightRound): string { } break; case 'monster': - // prompt to return to town and don't let them do anything - html.push(`

You were killed...

`); + if(roundData.player.hp === 0) { + html.push(`

You were killed...

`); + } html.push('

'); break; case 'in-progress': -- 2.25.1