Cocytus Succeeder
Posts: 2184
Joined: Tuesday, 3rd February 2015, 22:05
Use monster experience instead of HD in piety gain calc
Now, it is true that this function is, as someone else aptly described, a "bunch of hacks" stitched together. But from what I can see, it provides a much better gauge of monster difficulty than pure monster HD.
[Just a few examples. Both hobgoblins and rats have 1 HD, but hobgoblins give twice as much XP. I think we can agree that hobgoblins are tougher than rats. An adder gives 13 times as much XP as a rat, but only has twice the HD. I think we can agree that fighting 2 rats (one at a time) is easier than fighting one adder. The difficulty ratio of the two monsters is much closer to 13:1 than it is to 2:1. Worms have the same HD as orc warriors, but orc warriors give 25 times as much XP.]
Assuming we accept the above premise, I propose the following.
In god-conduct.cc, piety is largely based on monster HD. The piety gain code is hard to understand, but it would be a simple matter to replace monster HD with monster experience, with appropriate scaling.
This mechanic can also be used in determining how much HP, say, Makhleb gives on kills. Currently, the HP gain is directly proportional to HD. Make it directly proportional to (monster XP) / (player XL), or something like that.
[Btw, I'm currently trying this out in my attempt to balance DD heal rate in the implementation described in this thread. Using the original Makhleb healing code resulted in a completely broken DD.]