foundryvtt / dnd5e

An implementation of the 5th Edition game system for Foundry Virtual Tabletop (http://foundryvtt.com).
MIT License
339 stars 226 forks source link

Wrong Maximized Critical Damage for rolls with dice modifiers #3530

Closed Ikaguia closed 3 months ago

Ikaguia commented 6 months ago

With the configuration to maximize dice on critical hit damage, if your weapon has dice modifiers, like 2d8kh (for things like Savage Attacker) the maximized damage will ignore the modifiers (16 in this example, instead of 8)

Hoppyhob commented 5 months ago

It seems like instead of trying to calculate the maximum we should evaluate the maximum with foundry. I can push a PR where I made that change, however it works in v11 but in v12 evaluate({ maximize: true }) does not call _evaluateModifiers() (I have a work around that checks the version and calls _evaluateModifiers() if it is v12 but it requires calling private Die api so I am not sure where we stand on that) I have submitted a foundry issue for this https://github.com/foundryvtt/foundryvtt/issues/11093