kyleady / inkpot-powerroll

GNU General Public License v3.0
2 stars 2 forks source link

[Bugfix] Effect Ids #2

Closed kyleady closed 1 year ago

kyleady commented 1 year ago

Problem

Users would add a standard status effect such as prone with inkpot-powerroll. The user would then seek to toggle it off through the token while the Combat Utility Belt enhanced conditions feature was active. The toggle would add an extra prone effect. Only this extra prone effect would be toggleable. The original inkpot-powerroll prone effect could only be removed through the character sheet.

Solution

The bugfix looks up the id of standard status effects in CONFIG.statusEffects, preferring modified status ids first. If no modified status ids are found, use the normal status effect id.

Note

Also updated change from PR #1 to use game.socket instead of Hooks. This is a cleaner approach that also uses less code.