Skip to content

Commit

Permalink
bow fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sayterdarkwynd committed Jan 24, 2017
1 parent ed70221 commit b946965
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 4 additions & 1 deletion items/active/weapons/bow/abilities/bowshot.lua
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,14 @@ function BowShot:setCritDamage(damage)
if heldItem then
if root.itemHasTag(heldItem, "bow") then
self.critChance = 9 + weaponModifier
elseif if root.itemHasTag(heldItem, "crossbow") then
elseif root.itemHasTag(heldItem, "crossbow") then
self.critChance = 9 + weaponModifier
end
end
--sb.logInfo("crit chance base="..self.critChance)
if not self.critChance then
self.critChance = 0
end

--critBonus is bonus damage done with crits
self.critBonus = ( ( ( (status.stat("critBonus") + config.getParameter("critBonus",0)) * self.critChance ) /100 ) /2 ) or 0
Expand Down
3 changes: 3 additions & 0 deletions items/active/weapons/ranged/gunfire.lua
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ function GunFire:setCritDamage(damage)
end
end
--sb.logInfo("crit chance base="..self.critChance)
if not self.critChance then
self.critChance = 0
end

--critBonus is bonus damage done with crits
self.critBonus = ( ( ( (status.stat("critBonus") + config.getParameter("critBonus",0)) * self.critChance ) /100 ) /2 ) or 0
Expand Down

0 comments on commit b946965

Please sign in to comment.