Skip to content
Snippets Groups Projects
Commit 66a52dc6 authored by DarkGod's avatar DarkGod
Browse files

Reduced damage mod on staves to 80%

Channel Staff provides a 20% damage mod bonus to the staff firing
parent 619a5d7d
No related branches found
No related tags found
No related merge requests found
...@@ -1366,7 +1366,7 @@ function _M:combatStatLimit(stat, limit, low, high) ...@@ -1366,7 +1366,7 @@ function _M:combatStatLimit(stat, limit, low, high)
end end
--- Gets the damage --- Gets the damage
function _M:combatDamage(weapon) function _M:combatDamage(weapon, adddammod)
weapon = weapon or self.combat or {} weapon = weapon or self.combat or {}
local sub_cun_to_str = false local sub_cun_to_str = false
...@@ -1380,6 +1380,11 @@ function _M:combatDamage(weapon) ...@@ -1380,6 +1380,11 @@ function _M:combatDamage(weapon)
if self.use_psi_combat and stat == "dex" then stat = "cun" end if self.use_psi_combat and stat == "dex" then stat = "cun" end
totstat = totstat + self:getStat(stat) * mod totstat = totstat + self:getStat(stat) * mod
end end
if adddammod then
for stat, mod in pairs(adddammod) do
totstat = totstat + self:getStat(stat) * mod
end
end
if self.use_psi_combat then if self.use_psi_combat then
if self:knowTalent(self.T_GREATER_TELEKINETIC_GRASP) then if self:knowTalent(self.T_GREATER_TELEKINETIC_GRASP) then
local g = self:getTalentFromId(self.T_GREATER_TELEKINETIC_GRASP) local g = self:getTalentFromId(self.T_GREATER_TELEKINETIC_GRASP)
...@@ -1401,7 +1406,7 @@ function _M:combatDamage(weapon) ...@@ -1401,7 +1406,7 @@ function _M:combatDamage(weapon)
local power = math.max((weapon.dam or 1), 1) local power = math.max((weapon.dam or 1), 1)
power = (math.sqrt(power / 10) - 1) * 0.5 + 1 power = (math.sqrt(power / 10) - 1) * 0.5 + 1
--print(("[COMBAT DAMAGE] power(%f) totstat(%f) talent_mod(%f)"):format(power, totstat, talented_mod)) -- print(("[COMBAT DAMAGE] power(%f) totstat(%f) talent_mod(%f)"):format(power, totstat, talented_mod))
return self:rescaleDamage(0.3*(self:combatPhysicalpower(nil, weapon) + totstat) * power * talented_mod) return self:rescaleDamage(0.3*(self:combatPhysicalpower(nil, weapon) + totstat) * power * talented_mod)
end end
......
...@@ -52,7 +52,7 @@ newEntity{ base = "BASE_STAFF", ...@@ -52,7 +52,7 @@ newEntity{ base = "BASE_STAFF",
dam = 10, dam = 10,
apr = 2, apr = 2,
physcrit = 2.5, physcrit = 2.5,
dammod = {mag=1}, dammod = {mag=0.8},
}, },
wielder = resolvers.staff_wielder(), wielder = resolvers.staff_wielder(),
} }
...@@ -67,7 +67,7 @@ newEntity{ base = "BASE_STAFF", ...@@ -67,7 +67,7 @@ newEntity{ base = "BASE_STAFF",
dam = 15, dam = 15,
apr = 3, apr = 3,
physcrit = 3, physcrit = 3,
dammod = {mag=1}, dammod = {mag=0.8},
}, },
wielder = resolvers.staff_wielder(), wielder = resolvers.staff_wielder(),
} }
...@@ -82,7 +82,7 @@ newEntity{ base = "BASE_STAFF", ...@@ -82,7 +82,7 @@ newEntity{ base = "BASE_STAFF",
dam = 20, dam = 20,
apr = 4, apr = 4,
physcrit = 3.5, physcrit = 3.5,
dammod = {mag=1}, dammod = {mag=0.8},
}, },
wielder = resolvers.staff_wielder(), wielder = resolvers.staff_wielder(),
} }
...@@ -97,7 +97,7 @@ newEntity{ base = "BASE_STAFF", ...@@ -97,7 +97,7 @@ newEntity{ base = "BASE_STAFF",
dam = 25, dam = 25,
apr = 5, apr = 5,
physcrit = 4.5, physcrit = 4.5,
dammod = {mag=1}, dammod = {mag=0.8},
}, },
wielder = resolvers.staff_wielder(), wielder = resolvers.staff_wielder(),
} }
...@@ -112,7 +112,7 @@ newEntity{ base = "BASE_STAFF", ...@@ -112,7 +112,7 @@ newEntity{ base = "BASE_STAFF",
dam = 30, dam = 30,
apr = 6, apr = 6,
physcrit = 5, physcrit = 5,
dammod = {mag=1}, dammod = {mag=0.8},
}, },
wielder = resolvers.staff_wielder(), wielder = resolvers.staff_wielder(),
} }
...@@ -65,7 +65,7 @@ newTalent{ ...@@ -65,7 +65,7 @@ newTalent{
if not x or not y then return nil end if not x or not y then return nil end
-- Compute damage -- Compute damage
local dam = self:combatDamage(combat) local dam = self:combatDamage(combat, {mag=0.2})
local damrange = self:combatDamageRange(combat) local damrange = self:combatDamageRange(combat)
dam = rng.range(dam, dam * damrange) dam = rng.range(dam, dam * damrange)
dam = self:spellCrit(dam) dam = self:spellCrit(dam)
...@@ -80,7 +80,8 @@ newTalent{ ...@@ -80,7 +80,8 @@ newTalent{
local damagemod = t.getDamageMod(self, t) local damagemod = t.getDamageMod(self, t)
return ([[Channel raw mana through your staff, projecting a bolt of your staff's damage type, doing %d%% staff damage. return ([[Channel raw mana through your staff, projecting a bolt of your staff's damage type, doing %d%% staff damage.
The bolt will only hurt hostile targets, and pass safely through friendly ones. The bolt will only hurt hostile targets, and pass safely through friendly ones.
This attack always has a 100%% chance to hit, and ignores the target's Armour.]]): This attack always has a 100%% chance to hit, and ignores the target's Armour.
When projecting a bolt with your staff its damage modifier is increased by 20%%.]]):
format(damagemod * 100) format(damagemod * 100)
end, end,
} }
......
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