angband/angband — pull request #282 by ayrtonmassey (2013-11-10 20:45:29+00:00)
Title: Display average spell damage when browsing

In response to ticket 379 (http://trac.rephial.org/ticket/379):

- Added the function damrollavg() to calculate the average value of a dice roll.
- Appends the average damage/range/duration of each spell/prayer to the info given in get_spell_info(). The average value is displayed in brackets after the formula, e.g. for magic missile at level 1 the info is now:

dam 3d4 (7.5)

unfortunately if the numbers involved are too large the info is clipped by the edge of the window.

(This was completed as part of my coursework so I won't be too offended if you choose not to include it)