From 66a52dc6f5d2588741954e8afd99d70beab73ffd Mon Sep 17 00:00:00 2001 From: DarkGod <darkgod@net-core.org> Date: Sun, 2 Feb 2014 16:37:20 +0100 Subject: [PATCH] Reduced damage mod on staves to 80% Channel Staff provides a 20% damage mod bonus to the staff firing --- game/modules/tome/class/interface/Combat.lua | 9 +++++++-- game/modules/tome/data/general/objects/staves.lua | 10 +++++----- game/modules/tome/data/talents/spells/staff-combat.lua | 5 +++-- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/game/modules/tome/class/interface/Combat.lua b/game/modules/tome/class/interface/Combat.lua index d1a631abde..cf74fe0afb 100644 --- a/game/modules/tome/class/interface/Combat.lua +++ b/game/modules/tome/class/interface/Combat.lua @@ -1366,7 +1366,7 @@ function _M:combatStatLimit(stat, limit, low, high) end --- Gets the damage -function _M:combatDamage(weapon) +function _M:combatDamage(weapon, adddammod) weapon = weapon or self.combat or {} local sub_cun_to_str = false @@ -1380,6 +1380,11 @@ function _M:combatDamage(weapon) if self.use_psi_combat and stat == "dex" then stat = "cun" end totstat = totstat + self:getStat(stat) * mod 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:knowTalent(self.T_GREATER_TELEKINETIC_GRASP) then local g = self:getTalentFromId(self.T_GREATER_TELEKINETIC_GRASP) @@ -1401,7 +1406,7 @@ function _M:combatDamage(weapon) local power = math.max((weapon.dam or 1), 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) end diff --git a/game/modules/tome/data/general/objects/staves.lua b/game/modules/tome/data/general/objects/staves.lua index 91d21d7bcc..51671a686f 100644 --- a/game/modules/tome/data/general/objects/staves.lua +++ b/game/modules/tome/data/general/objects/staves.lua @@ -52,7 +52,7 @@ newEntity{ base = "BASE_STAFF", dam = 10, apr = 2, physcrit = 2.5, - dammod = {mag=1}, + dammod = {mag=0.8}, }, wielder = resolvers.staff_wielder(), } @@ -67,7 +67,7 @@ newEntity{ base = "BASE_STAFF", dam = 15, apr = 3, physcrit = 3, - dammod = {mag=1}, + dammod = {mag=0.8}, }, wielder = resolvers.staff_wielder(), } @@ -82,7 +82,7 @@ newEntity{ base = "BASE_STAFF", dam = 20, apr = 4, physcrit = 3.5, - dammod = {mag=1}, + dammod = {mag=0.8}, }, wielder = resolvers.staff_wielder(), } @@ -97,7 +97,7 @@ newEntity{ base = "BASE_STAFF", dam = 25, apr = 5, physcrit = 4.5, - dammod = {mag=1}, + dammod = {mag=0.8}, }, wielder = resolvers.staff_wielder(), } @@ -112,7 +112,7 @@ newEntity{ base = "BASE_STAFF", dam = 30, apr = 6, physcrit = 5, - dammod = {mag=1}, + dammod = {mag=0.8}, }, wielder = resolvers.staff_wielder(), } diff --git a/game/modules/tome/data/talents/spells/staff-combat.lua b/game/modules/tome/data/talents/spells/staff-combat.lua index fbd5b7eebd..99eee9cb15 100644 --- a/game/modules/tome/data/talents/spells/staff-combat.lua +++ b/game/modules/tome/data/talents/spells/staff-combat.lua @@ -65,7 +65,7 @@ newTalent{ if not x or not y then return nil end -- Compute damage - local dam = self:combatDamage(combat) + local dam = self:combatDamage(combat, {mag=0.2}) local damrange = self:combatDamageRange(combat) dam = rng.range(dam, dam * damrange) dam = self:spellCrit(dam) @@ -80,7 +80,8 @@ newTalent{ 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. 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) end, } -- GitLab