foundryvtt / dnd5e

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

Duplicated logic when performing D20 rolls #2966

Open krbz999 opened 9 months ago

krbz999 commented 9 months ago

For example, Actor5e#_prepareSkill prepares each skill object (this shows on the sheet), yet when performing a skill "check", the whole logic is redone and the skill object is not actually used.

Actor5e#rollSkill should use the relevant skill object, not calculate the bonus each time.

arbron commented 9 months ago

The issue is that _prepareSkill merges all bonuses together into one final value, while rollSkill displays them separately. What we'd need to do for this is to store the different bonus parts and prepared data within each skill object.