Page 1 of 1

[svn] Vitality status effect reduction

Posted: Tue Mar 13, 2012 5:10 am
by lukep

Code: Select all

        if self:knowTalent(self.T_VITALITY) and e.status == "detrimental" and (e.subtype.wound or e.subtype.poison or e.subtype.disease) then
-               local t = self:getTalentFromId(self.T_VITALITY)
+               local t = util.bound(self:getTalentFromId(self.T_VITALITY), 0, 1)
                p.dur = math.ceil(p.dur * (1 - t.getWoundReduction(self, t)))
        end
Should be:

Code: Select all

        if self:knowTalent(self.T_VITALITY) and e.status == "detrimental" and (e.subtype.wound or e.subtype.poison or e.subtype.disease) then
               local t = self:getTalentFromId(self.T_VITALITY)
-               p.dur = math.ceil(p.dur * (1 - t.getWoundReduction(self, t)))
+               p.dur = math.ceil(p.dur * (1 - util.bound(t.getWoundReduction(self, t), 0, 1)))
        end
?