PDA

View Full Version : NPC immunity parsing



SpiritofFire
October 18th, 2016, 17:57
Hi,

I was creating an NPC and was curious how the immunities field got parsed into an actual effect on the combat tracker. I copied and pasted an entry from the MM, and even though the entry is written in plain English, it was correctly translated into the right effect.

The description "piercing, slashing, etc damage from nonmagical weapons that aren't silvered" got translated to an effect that went like "piercing,slashing, !magic, !silvered"

I was expecting to type in the effect properties directly rather than the normal text description. How does this work? Does it look for key words like "from" or "aren't"?

Moon Wizard
October 18th, 2016, 18:21
There's some code in the 5E ruleset that looks for specific resistance/immunity keywords in specific orders. Specifically, it looks for damage types, then "from nonmagical weapons/attacks", then "that aren't silvered/adamantine/cold-forged iron".

Regards,
JPG