Handling Custom Damage
yeelp opened this issue ยท 0 comments
Related to #12, but I'm making a separate issue for this to track ideas and to separate this from the list of ideas in the aforementioned issue.
Armors can be configured to resist custom damage types. A slight alteration to how damage is inflicted is needed.
Say a zombie inflicts custom necrotic damage. No longer will it inflict bludgeoning damage. In other words, custom damage types override physical damage distributions. Now there's no concern about the zombie's damage being reduced multiple times (once from necrotic resistance, once from bludgeoning resistance). The logical reasoning behind this is that once an attack inherits an elemental or otherworldly property, the physical interaction that caused that attack is hardly a concern. Implementation wise, this lets me separate physical damage calculations from custom damage calculations. I'll never need to consider an attack inflicting custom damage and physical damage at the same time, so I never need to consider how to balance armor resistances, which was my biggest concern.
An attack can inflict multiple custom damage types, but I think the best way to handle that is to take the armor's highest resistance and use that.
Say a wendigo inflicts cold and necrotic damage. Get the defender's total cold resistance and necrotic resistance and use whichever is higher. Either that or average all the resistances. Maybe make a config option for the behaviour.
Actually I'm thinking about it and adding a config option for that seems best here.