-
May 6th, 2023, 23:34 #1
5E ActionDamage.checkNumericalReductionType
If checkNumericalReductionType is called and aReduction filter is "all" AND the damage roll has multiple damage types (aDmgType) this function will over reduce because it calls the checkNumericalReductionTypeHelper function with "all" for the number of aDmgType on the damage roll.
I believe the following is what was intended.
Code:function checkNumericalReductionType(aReduction, aDmgType, nLimit) local nAdjust = 0; local nSpecificAdjust; for _,sDmgType in pairs(aDmgType) do if nLimit then nSpecificAdjust = ActionDamage.checkNumericalReductionTypeHelper(aReduction[sDmgType], aDmgType, nLimit); nAdjust = nAdjust + nSpecificAdjust; else nAdjust = nAdjust + ActionDamage.checkNumericalReductionTypeHelper(aReduction[sDmgType], aDmgType); end end if nLimit then local nGlobalAdjust = ActionDamage.checkNumericalReductionTypeHelper(aReduction["all"], aDmgType, nLimit - nSpecificAdjust); nAdjust = nAdjust + nGlobalAdjust; else nAdjust = nAdjust + ActionDamage.checkNumericalReductionTypeHelper(aReduction["all"], aDmgType); end return nAdjust; end
-
May 7th, 2023, 20:43 #2
Supreme Deity
- Join Date
- Mar 2007
- Posts
- 19,657
Thanks, I'll incorporate in the next big ruleset push.
Regards,
JPGFG Wish List - https://fgapp.idea.informer.com/
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks