jbhaywood / 5e-statblock-importer

A module for FoundryVTT that creates a new actor from any 5e monster or NPC statblock.
MIT License
18 stars 14 forks source link

Modifier is incorrectly added to all damage rolls #26

Closed danlite closed 2 years ago

danlite commented 2 years ago

Taking the Ankheg as an example...

Large monstrosity, unaligned

Armor Class 14 (natural armor), 11 while prone
Hit Points 39 (6d10 + 6)
Speed 30 ft., burrow 10 ft.

STR DEX CON INT WIS CHA
17 (+3) 11 (+0) 13 (+1) 1 (-5)  13 (+1) 6 (-2)
Senses darkvision 60 ft., tremorsense 60 ft., passive Perception 11
Languages --
Challenge 2 (450 XP)

Actions
Bite. Melee Weapon Attack: +5 to hit, reach 5 ft., one target. Hit: 10 (2d6 + 3) slashing damage plus 3 (1d6) acid damage. If the target is a Large or smaller creature, it is grappled (escape DC 13). Until this grapple ends, the ankheg can bite only the grappled creature and has advantage on attack rolls to do so.
Acid Spray (Recharge 6). The ankheg spits acid in a line that is 30 feet long and 5 feet wide, provided that it has no creature grappled. Each creature in that line must make a DC 13 Dexterity saving throw, taking 10 (3d6) acid damage on a failed save, or half as much damage on a successful one.

...the imported Bite and Acid Spray abilities have an incorrect +3 to their acid damage rolls:

Screen Shot 2022-05-21 at 1 11 46 PM

It looks like setDamageRolls should check the value of damagemod1 and damagemod2 capture groups against the relevant ability score before appending + @mod to the damage.

jbhaywood commented 2 years ago

Thanks for pointing that out. Fixed in 1.4.5