The real risks are usually a bit different:
"what are the odds of dying if my wand of TO fails?"
"What are the odds of TS landing me in a room full of high level hounds?"
"What are the odds of getting breathed on followed by a TO failure and further mauling?"

I guess you could do a simulation at the end of each turn, where every enemy in LOS does their strongest attack while rolling perfectly (but ignoring stuff like stunning, poison, paralysis, etc). Then at the end of the game you could say "you risked death N times to get this far". You could maybe also calculate the odds of a given death actually happening, but that gets hairy when dealing with damage rolls. If Morgoth has a 1 in 20 chance to cast Mana Storm and Vecna has a one in 30 chance of same, and between them they'd need to deal at least 800 damage to kill you, what are the odds of that happening? It's calculable, but it's not the kind of code I'd want to deal with writing.

This only keep tracks of a few of the possible factors; most notably, surviving (potential) blows that could have killed you.

I didn't use Montecarlo (which I suppose would be inaccurate because the probabilities of dying are quite small; maybe one would need something more elaborate like MCMC instead?), but I keep track of the individual probabilities of each hit and damage roll. Most of the relevant code is in https://github.com/fph/mortsil/blob/...Sil/src/mort.c .

I didn't really update this because people did not seem too interested in it.

__________________
“We're more of the love, blood, and rhetoric school. Well, we can do you blood and love without the rhetoric, and we can do you blood and rhetoric without the love, and we can do you all three concurrent or consecutive. But we can't give you love and rhetoric without the blood. Blood is compulsory. They're all blood, you see.”
― Tom Stoppard, Rosencrantz and Guildenstern are Dead