From: xangelo Date: Wed, 16 Aug 2023 18:30:59 +0000 (-0400) Subject: fix: dont display death text after fleeing X-Git-Tag: v0.2.10~9 X-Git-Url: https://git.xangelo.ca/?a=commitdiff_plain;h=2a1bffe7e3d18b06f3c4139f7014494420912a3b;p=risinglegends.git 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. --- 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':