Fix duplicate effect bonuses being applied to attacks

Intent

Prevent duplicate bonuses being applied and displayed to the user, also deduping all modifications on roll, based on the mods ID.


  • This is meant for a hotfix
  • This is meant for the next release (see milestone)
  • This needs more reviewers than normal; there may be controversy or high complexity
  • This intentionally introduces regressions that will be addressed later
  • There is/will be documentation changes on the wiki
  • Please do not send commits here without coordinating closely with the owner
  • This is a Build System change

Related Issues

Steps to Test

Follow the steps as described in #1017 (closed):

  1. Create Active Effect with Autofire skill bonus (provided below).
  2. Equip weapon and roll an Autofire attack.
  3. Observe the duplication of the Active Effect Bonus by hovering the mouse over the Total Mods: bonus in the attack roll dialogue window (images provided below)

Future Work

Currently there are two paths, one for collecting mods for the actual roll, and another for initial calculation to break down the mods to display to the user. These should probably use the same code path to avoid deviating logic. I could have added checks to each part of CPRMod.getSituationalRollMods() but this seemed like a lot of extra code and this method is big, complex, and scary already.

Additional Notes

[Type text here]

Merge request reports

Loading