(Comments Requested) Monster Invulnerability JSON field#82286
(Comments Requested) Monster Invulnerability JSON field#82286Maleclypse wants to merge 4 commits intoCleverRaven:masterfrom
Conversation
Use deserialize functions for cleaner reading, and to enable using optional/mandatory, which have better error reporting and support for extended features.
|
Defaulting invulnerability to everything doesn't make sense, as it would default to a monster that cannot be harmed. If it isn't actually invulnerability, but rather resistance, it might make marginally more sense (in which case I suggest changing the name to resistance). However, I would suggest resistances should be listed explicitly, and omission should be erroneous. You could allow for an "all" entry, but then it should be stated explicitly, otherwise we'll likely end up with monsters that are resistant to everything just because the creator forgot to fill in the entry for what it's actually resistant against. The various gas/liquid filled monsters might be given negative resistance to piercing damage, i.e. vulnerability (which is another way to spin it, with negative values being resistances)... |
Resistance is a better name for it and I wasn't actually intending it to default to all I was more trying to create enough framework to show someone who can potentially take it further than me. |
|
Maleclypse#47 fyi |
Clean up JSON loading & use std::optional
Summary
Features "Monster Invulnerability"
Purpose of change
Storm and I have been talking about some potential ways to make monsters have some unique ways of handling damage types. I've tried to get this far enough that maybe someone with better skills than me can take it the rest of the way.
Describe the solution
I've kinda written up some potential structure for the json but I don't think I can take this across the finish line.
Describe alternatives you've considered
Testing
Additional context