[1.0.4] Debuffing is not that useful.
Posted: Wed May 29, 2013 1:26 am
Debuffing spellpower, physical power and mental power will only work if the target already has a positive value in these variables because the code only considers these value as 0 or positive.
This means if a creature has base 0 spellpower but 100 magic and get's a spellpower debuff (like Intimidated from conditioning, or from talent beckon) his spellpower will remain the same.
These debuffs would be usefull if this target had 100 spellpower and 0 magic, because the debuff would reduce this 100 to a lower number, applying the debuff.
If in this exapmple the debuff was 110 spellpower then only 100 spellpower debuff would be usefull and the rest would be "lost" because in the code the -10 would be increased to 0.
Shown in the code:
function _M:combatSpellpower(mod, add)
mod = mod or 1
add = add or 0
if self:knowTalent(self.T_ARCANE_CUNNING) then
add = add + (15 + self:getTalentLevel(self.T_ARCANE_CUNNING) * 5) * self:getCun() / 100
end
if self:knowTalent(self.T_SHADOW_CUNNING) then
add = add + (15 + self:getTalentLevel(self.T_SHADOW_CUNNING) * 5) * self:getCun() / 100
end
if self:hasEffect(self.EFF_BLOODLUST) then
add = add + self:hasEffect(self.EFF_BLOODLUST).dur
end
local am = 1
if self:attr("spellpower_reduction") then am = 1 / (1 + self:attr("spellpower_reduction")) end
local d = (self.combat_spellpower > 0 and self.combat_spellpower or 0) + add + self:getMag()
if self:attr("dazed") then d = d / 2 end
return self:rescaleCombatStats(d) * mod * am
end
This means if a creature has base 0 spellpower but 100 magic and get's a spellpower debuff (like Intimidated from conditioning, or from talent beckon) his spellpower will remain the same.
These debuffs would be usefull if this target had 100 spellpower and 0 magic, because the debuff would reduce this 100 to a lower number, applying the debuff.
If in this exapmple the debuff was 110 spellpower then only 100 spellpower debuff would be usefull and the rest would be "lost" because in the code the -10 would be increased to 0.
Shown in the code:
function _M:combatSpellpower(mod, add)
mod = mod or 1
add = add or 0
if self:knowTalent(self.T_ARCANE_CUNNING) then
add = add + (15 + self:getTalentLevel(self.T_ARCANE_CUNNING) * 5) * self:getCun() / 100
end
if self:knowTalent(self.T_SHADOW_CUNNING) then
add = add + (15 + self:getTalentLevel(self.T_SHADOW_CUNNING) * 5) * self:getCun() / 100
end
if self:hasEffect(self.EFF_BLOODLUST) then
add = add + self:hasEffect(self.EFF_BLOODLUST).dur
end
local am = 1
if self:attr("spellpower_reduction") then am = 1 / (1 + self:attr("spellpower_reduction")) end
local d = (self.combat_spellpower > 0 and self.combat_spellpower or 0) + add + self:getMag()
if self:attr("dazed") then d = d / 2 end
return self:rescaleCombatStats(d) * mod * am
end