{{ $level := (cond (gt .dungeon.level.n 0) (.dungeon.level.descriptive | lower) .dungeon.level.descriptive) }}
<div>{{ if .death.cause }}🪦{{ end }}</div>
<h4 class="date">{{ time.Format "January 2, 2006" .end_date }}</h4>
<div class="character-descriptor">{{ .character.abbreviated }}</div>
<p>{{ .character.name }}, a {{ .character.alignment.descriptive | lower }} {{ .character.race.descriptive | lower }}
    {{ .character.gender.descriptive | lower }} {{ .character.role.descriptive }},
    died {{ if gt .death.count 1 }}for the last time{{ end }} in <span class="nobreak">{{ .dungeon.name }}</span>
    on <span class="nobreak">{{ $level }}</span>.
    She was {{ .death.cause }}.</p>
<table class="stats">
    <tr>
        <td class="began">Began {{ time.Format "January 2, 2006" .start_date }}</td>
        <td class="score">{{ .score | lang.FormatNumber 0 }} points</td>
        <td class="level">Level {{ .character.max_level }}</td>
        <td class="hp">{{ cond (gt .character.hp.n 0) (printf "%s / %s" .character.hp.n .character.hp.max)
            .character.hp.max }} hp</td>
    </tr>
</table>