Opened 9 years ago

Last modified 8 years ago

#379 new change

Average spell damage when browsing.

Reported by: morth@… Owned by:
Milestone: Future Keywords: recall


It would be nice if the description of spells (when browsing) displayed the average damage per turn and per mana. Including accounting for failure percent. All the information is already present, except you have to do the caclulation manually.

Looking a bit at the code, this can be combined with some cleanup. The damage for each spell is currently stored in two locations, get_spell_info() and cast_{mage,priest}_spell(). It should probably be extracted to a single function, which could then be used everywhere.

At a later stage, I can imagine the same being done for durations, ranges and heals, and then you could eventually move it from this/these single functions into the edit files without much effort.

Change History (2)

comment:1 Changed 9 years ago by zaimoni@…

Most of this shares infrastructure with the monster fear changes I'm planning for my variant. The code reorganization involved is noticeable, even ignoring the differences between C and C++. [E.g.: struct dice_sides, and a function that directly estimates the average damage.]

comment:2 Changed 8 years ago by magnate

  • Keywords recall added
Note: See TracTickets for help on using tickets.