Hi Kel,
I've found an odd behaviour in the management of DR effects: DR on PCs is not calculated correctly, while on NPCs works perfectly.
How to reproduce this issue (disable all other extensions before the test):
-Setup this effect in the CT for the PC: "DR: 4"
-Roll NPC damage vs this PC (e.g., you roll 2)
-Damage is dealt to the PC, even if it shouldn't have.
The issue is in function getDamageAdjust (file manager_action_damage.lua), at line 1598:
Code:
end
end
-- APPLY DAMAGE ADJUSTMENT FROM THIS DAMAGE CLAUSE TO OVERALL DAMAGE ADJUSTMENT
nDamageAdjust = nDamageAdjust + nLocalDamageAdjust - nNonlethalAdjust;
nNonlethal = nNonlethal + nNonlethalAdjust;
end
end
-- RESULTS
return nDamageAdjust, nNonlethal, bVulnerable, bResist;
end
The code should be modified with the following:
Code:
end
end
end
-- APPLY DAMAGE ADJUSTMENT FROM THIS DAMAGE CLAUSE TO OVERALL DAMAGE ADJUSTMENT
nDamageAdjust = nDamageAdjust + nLocalDamageAdjust - nNonlethalAdjust;
nNonlethal = nNonlethal + nNonlethalAdjust;
end
-- RESULTS
return nDamageAdjust, nNonlethal, bVulnerable, bResist;
end
After this fix, DR will be applied correctly.
During the check, I've realized that your version of manager_action_damage.lua is quite different from official 3.5E ruleset: I've recoded your lua to comply with the 3.5E version (see attachment). Please feel free to use use it at your convenience.