…as I just had to discover while adding a new attack power for monsters to ADOM (related to the new domain of the Ice Queen but in the future also usable for other beings). I just noticed that killing a monster is handled inconsistently throughout the code.
The short version is that a lot of reactions can follow to killing a monster, from quests being fulfilled to alerts being raised to other monsters becoming hostile to various internal statistics being affected, etc. This gets more complicated by the fact that monsters can be killed either by the PC or other monsters (which may sound trivial but which it is not as the initial code did not consider monsters killing monsters and this stuff got tacked on later). In fact there now exist about half a dozen of methods handling the death of a monster, all in slightly different ways, sometimes calling each other in ways I no longer understand (or which are just wrong).
As the problems usually arise only in marginal cases (but maybe not always) it might be that nobody notices the effects. And we wouldn't be extending the game, it would not be a problem. But as I am extending the game right now, it is a problem - as I don't really understand the correct way to notify the game about the death of a monster anymore (due to the existing variants).
The consequence is simple: refactoring for unification. The actual execution is not, as 180.000+ lines of code need to be analyzed and who knows what kind of inconsistent results might occur. I guess that Prerelease 21 will be interesting in more than one respect. Sadly it will be very hard to roll back such a sweeping change if it causes major problems.
Oh well… Frankenstein also had peculiar problems with his resurrection approach… so why should this be different?