munificent/hauberk — pull request #16 by maetl (2014-12-26 14:01:31+00:00)
Title: Slightly nicer messages on death

The game over screen now shows the name of the monster that killed you. Currently looks something like:

```
You were slain by the simpering knave.
```

I thought it would be nice if the death screen was presented in the past tense (in contrast to the rest of the log messages, which are in present tense).

I put this into the log, as it seemed a bit overkill to introduce a special `HeroStone` or `Epitaph` object at this stage, but I did go down a bit of a rabbit hole looking for ways to describe the death in more detail based on the action/attack verb. See below...

### Notes and thoughts:

- Unsure whether it matters if a monster’s death is logged before the monster’s drops are logged, or after.

- One tricky thing is that the verbs associated with attacks aren’t set up to be accessed atomically. Pulling the string out of the context where `onDied` is called would require more code changes than I thought at first.

- It might be silly/annoying to have to go through the entire list of monsters/items and add past tense variations of attack verbs just to open up creative possibilities for the death screen.

- For improved texture/tone, insects and small creatures could use the verb **killed**; people, goblins, etc could use the verb **slain**.

- What happens when the hero dies of an effect (cold, fire, poison)? In these cases, the message should be something like: `[Hero] succumbed to the effects of [monster] [material].`

eg:

```
You were killed by slug poison.
You succumbed to the effects of the slug’s poison.
```

(Sentences with the possessive apostrophe would require additional messing about with formatting code to generalize)

- An alternative way to handle this would be to forget about the idea of converting verbs to past-tense from the in-game actions and instead, procedurally generate a unique sentence based on the hero’s class and XP, the number of turns they survived in that level, and similar info at the point of death.

eg:

```
You were unceremoniously slain by the simpering knave. What a waste.
You bleed slowly to death on the dungeon floor.
Your plea for death is answered. The goblin peon is victorious.
```

Or:

```
________________________________
/ \
| R.I.P |
| |
| Here lies [Hero] |
| The [Class] |
| Who fought [Adj] |
| Against the [Adj][Monsters] |
| Of the [Level] |
| |
| |
|________________________________|
```

See also:

- https://github.com/TheBerkin/Rant
- http://en.wikipedia.org/wiki/Hero_stone