Page 1 of 1

[b35] broken/exploitable typo in Physical Power code!!

Posted: Wed Nov 23, 2011 3:54 am
by tiger_eye
Knife Mastery and Exotic Weapons Mastery talents are supposed to increase Physical Power by 5*tl as well as increasing the damage of their respective weapon types. The Physical Power calculation is wrong due to typos: it uses the Weapons Mastery talent level instead. The following change is needed:

Code: Select all

Index: game/modules/tome/class/interface/Combat.lua
===================================================================
--- game/modules/tome/class/interface/Combat.lua        (revision 4669)
+++ game/modules/tome/class/interface/Combat.lua        (working copy)
@@ -841,10 +841,10 @@
                add = add + 5 * self:getTalentLevel(Talents.T_WEAPONS_MASTERY)
        end
        if self:knowTalent(Talents.T_KNIFE_MASTERY) then
-               add = add + 5 * self:getTalentLevel(Talents.T_WEAPONS_MASTERY)
+               add = add + 5 * self:getTalentLevel(Talents.T_KNIFE_MASTERY)
        end
        if self:knowTalent(Talents.T_EXOTIC_WEAPONS_MASTERY) then
-               add = add + 5 * self:getTalentLevel(Talents.T_WEAPONS_MASTERY)
+               add = add + 5 * self:getTalentLevel(Talents.T_EXOTIC_WEAPONS_MASTERY)
        end
        if self:knowTalent(Talents.T_UNARMED_MASTERY) then
                add = add + 5 * self:getTalentLevel(Talents.T_UNARMED_MASTERY)
This sucks for knife users, and is too easily exploitable by sword, axe, and mace users.

Also, the Weapons Mastery talent says it increases the damage done by knives and exotic weapons by the same amount it increases damage for swords, aces, and maces, which is not the case. The following correction to the talent description is needed:

Code: Select all

Index: game/modules/tome/data/talents/techniques/combat-training.lua
===================================================================
--- game/modules/tome/data/talents/techniques/combat-training.lua       (revision 4669)
+++ game/modules/tome/data/talents/techniques/combat-training.lua       (working copy)
@@ -107,7 +107,7 @@
        info = function(self, t)
                local damage = t.getDamage(self, t)
                local inc = t.getPercentInc(self, t)
-               return ([[Increases Physical Power by %d. Also increases damage done with swords, axes, maces, knives, and exotic weapons by %d%%]]):
+               return ([[Increases Physical Power by %d. Also increases damage done with swords, axes, and maces by %d%%]]):
                format(damage, 100*inc)
        end,
 }