Offhand mindstars break skill multipliers.
Posted: Sat Apr 18, 2015 6:23 am
Using an offhand mindstar with a skill that does a percentage of weapon damage, you get an incorrect multiplier. It will always be 100% unless the skill does over 200% weapon damage, in which case it will be half the skill's multiplier. Note that this applies even to skills that do less than 100% damage: the 4x 35% of a rank 1 Dissolve becomes 4x 100% for an offhand mindstar!
Rather than a bunch of observational and reproduction data (always questionable), with Shibari's help I've tracked this down in the code. Here's how offhand multipliers are calculated:
Trimming out the conditionals for Dual Weapon Training, Corrupted Strength, and Curse of Madness, we're left with this:
So what's happening is, the skill multiplier is being multiplied by the default 1/2 offhand multiplier; then, if it's a mindblade (no_offhand_penalty), it's being set to no less than a 1.0 multiplier. A skill which does 220% will come out at 110%, but any skill of 200% or less will be 100% no matter what.
Assuming it's not intended for Curse of Madness to increase an offhand mindstar above 100% base damage, the easiest solution is changing the post-condition to a simple short circuit at the top:
Rather than a bunch of observational and reproduction data (always questionable), with Shibari's help I've tracked this down in the code. Here's how offhand multipliers are calculated:
Code: Select all
--- Gets the off hand multiplier
function _M:getOffHandMult(combat, mult)
local offmult = 1/2
-- Take the bigger multiplier from Dual weapon training and Corrupted Strength
if self:knowTalent(Talents.T_DUAL_WEAPON_TRAINING) then
offmult = math.max(offmult,self:callTalent(Talents.T_DUAL_WEAPON_TRAINING,"getoffmult"))
end
if self:knowTalent(Talents.T_CORRUPTED_STRENGTH) then
offmult = math.max(offmult,self:callTalent(Talents.T_CORRUPTED_STRENGTH,"getoffmult"))
end
offmult = (mult or 1)*offmult
if self:hasEffect(self.EFF_CURSE_OF_MADNESS) then
local eff = self:hasEffect(self.EFF_CURSE_OF_MADNESS)
if eff.level >= 1 and eff.unlockLevel >= 1 then
local def = self.tempeffect_def[self.EFF_CURSE_OF_MADNESS]
offmult = offmult + ((mult or 1) * def.getOffHandMultChange(eff.level) / 100)
end
end
if combat and combat.no_offhand_penalty then
return math.max(1, offmult)
else
return offmult
end
end
Code: Select all
--- Gets the off hand multiplier
function _M:getOffHandMult(combat, mult)
local offmult = 1/2
offmult = (mult or 1)*offmult
if combat and combat.no_offhand_penalty then
return math.max(1, offmult)
else
return offmult
end
end
Assuming it's not intended for Curse of Madness to increase an offhand mindstar above 100% base damage, the easiest solution is changing the post-condition to a simple short circuit at the top:
Code: Select all
--- Gets the off hand multiplier
function _M:getOffHandMult(combat, mult)
if combat and combat.no_offhand_penalty then
-- No offhand modifiers for this weapon
return (mult or 1)
end
local offmult = 1/2
-- Take the bigger multiplier from Dual weapon training and Corrupted Strength
if self:knowTalent(Talents.T_DUAL_WEAPON_TRAINING) then
offmult = math.max(offmult,self:callTalent(Talents.T_DUAL_WEAPON_TRAINING,"getoffmult"))
end
if self:knowTalent(Talents.T_CORRUPTED_STRENGTH) then
offmult = math.max(offmult,self:callTalent(Talents.T_CORRUPTED_STRENGTH,"getoffmult"))
end
offmult = (mult or 1)*offmult
if self:hasEffect(self.EFF_CURSE_OF_MADNESS) then
local eff = self:hasEffect(self.EFF_CURSE_OF_MADNESS)
if eff.level >= 1 and eff.unlockLevel >= 1 then
local def = self.tempeffect_def[self.EFF_CURSE_OF_MADNESS]
offmult = offmult + ((mult or 1) * def.getOffHandMultChange(eff.level) / 100)
end
end
return offmult
end