Closed Shaeress closed 3 months ago
Thank you for your report. I will investigate. There are some more issues in there that needs to be taken care of anyway. Next time however I'd appreciate if you could use the template for bugs. Especially now that v12 released it is very important to me to know which version of Foundry and SWADE users are using to reproduce a bug.
Also please not that you are referring to an outdated version of the API. The current one can be found here: https://foundryvtt.com/api/
My apologies, I wasn't entirely sure how to do things! My first time looking into Foundry code, I guess I just took the first API hit on google. ;D
I will take those remarks on board and do a better job next time.
I was using version 2.6.1 of SWIM and Foundry version 11 build 315.
No problem. =)
I've taken a look and your solution indeed worked just fine, thank you very much. It'll be in the next version of SWIM. But that might be some time down the road, depending on how much v12 broke.
When using the Fear Table Macro, the default table roll formula is always used, without modifier provided by the user in the Fear dialogue.
Steps to reproduce: put in a modifier of 21 or higher. Expected result: Heart Attack every time. Observed result: Everything but Heart Attack.
According to the documentation (https://foundryvtt.com/api/v9/RollTable.html) the "draw" method accepts only a single "options" object as parameter, so Line 55 of fear_table.js should turn from
const results = await fearTable.draw({ displayChat: false }, { roll });
to thisconst results = await fearTable.draw({ displayChat: false, roll });
After making this change on my end, the issues was resolved.