Skip to content
Snippets Groups Projects
Commit 032ce1fd authored by DarkGod's avatar DarkGod
Browse files

reverted staves mag dependancy

Staves accuracy bonus is now halved for short staves
parent 8147127f
No related branches found
No related tags found
No related merge requests found
......@@ -527,7 +527,6 @@ function _M:addedToLevel(level, x, y)
local inven, worn = self:getInven(o:wornInven())
if inven and game.state:checkPowers(self, o, nil, "antimagic_only") then -- check antimagic restrictions
local ro, replace = inven and inven[1], false
print("====", self.inven[self.INVEN_INVEN][i].uid)
o = self:removeObject(self.INVEN_INVEN, i)
if o then
......
......@@ -591,8 +591,7 @@ function _M:descAccuracyBonus(desc, weapon, use_actor)
elseif kind == "mace" then
desc:add("Accuracy bonus: ", {"color","LIGHT_GREEN"}, showpct(0.1, m), {"color","LAST"}, " dam / acc", true)
elseif kind == "staff" then
local magbonus = util.bound(0.833 + use_actor:getMag() / 4 / 3 * 2 / 10, 0, 2.5) -- Same 2.5% as before at @100 mag, 0.8% @0 mag
desc:add("Accuracy bonus: ", {"color","LIGHT_GREEN"}, showpct(magbonus, m), {"color","LAST"}, " procs dam / acc", true)
desc:add("Accuracy bonus: ", {"color","LIGHT_GREEN"}, showpct(2.5, m), {"color","LAST"}, " procs dam / acc", true)
elseif kind == "knife" then
desc:add("Accuracy bonus: ", {"color","LIGHT_GREEN"}, showpct(0.5, m), {"color","LAST"}, " APR / acc", true)
end
......
......@@ -664,8 +664,7 @@ end
function _M:attackTargetHitProcs(target, weapon, dam, apr, armor, damtype, mult, atk, def, hitted, crit, evaded, repelled, old_target_life)
if self:isAccuracyEffect(weapon, "staff") then
local magbonus = util.bound(0.00833 + self:getMag() / 4 / 3 * 2 / 1000, 0, 0.025) -- Same 2.5% as before at @100 mag, 0.8% @0 mag
local bonus = 1 + self:getAccuracyEffect(weapon, atk, def, magbonus, 2)
local bonus = 1 + self:getAccuracyEffect(weapon, atk, def, 2.5, 2)
print("[ATTACK] staff accuracy bonus", atk, def, "=", bonus)
self.__global_accuracy_damage_bonus = bonus
end
......
......@@ -651,6 +651,9 @@ newEntity{
level_range = {1, 50},
rarity = 15,
cost = 25,
combat = {
accuracy_effect_scale = 0.5,
},
wielder = {
},
resolvers.genericlast(function(e)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment