diff --git a/game/modules/tome/data/talents/spells/air.lua b/game/modules/tome/data/talents/spells/air.lua index cd285f23142fd3bfc018afa98a37b48feca98c8e..c57cd9fbb2298371e6ce68b0f84c2065775c2a39 100644 --- a/game/modules/tome/data/talents/spells/air.lua +++ b/game/modules/tome/data/talents/spells/air.lua @@ -40,7 +40,7 @@ newTalent{ local tg = self:getTalentTarget(t) local x, y = self:getTarget(tg) if not x or not y then return nil end - local dam = self:spellCrit(t.getDamage(self, t)) + local dam = thaumaturgyBeamDamage(self, self:spellCrit(t.getDamage(self, t))) self:project(tg, x, y, DamageType.LIGHTNING_DAZE, {dam=rng.avg(dam / 3, dam, 3), daze=self:attr("lightning_daze_tempest") or 0}) local _ _, x, y = self:canProject(tg, x, y) diff --git a/game/modules/tome/data/talents/spells/arcane.lua b/game/modules/tome/data/talents/spells/arcane.lua index 3fce7948e0ff3dc272a2f5a5b508548941def760..fae08fffc0526002881fb45daf9aaedc2db13526 100644 --- a/game/modules/tome/data/talents/spells/arcane.lua +++ b/game/modules/tome/data/talents/spells/arcane.lua @@ -45,8 +45,9 @@ newTalent{ local tg = self:getTalentTarget(t) local x, y = self:getTarget(tg) if not x or not y then return nil end + local dam = thaumaturgyBeamDamage(self, self:spellCrit(t.getDamage(self, t))) if tg.type == "beam" or tg.type == "widebeam" then - self:project(tg, x, y, DamageType.ARCANE, self:spellCrit(t.getDamage(self, t)), nil) + self:project(tg, x, y, DamageType.ARCANE, dam, nil) local _ _, x, y = self:canProject(tg, x, y) if thaumaturgyCheck(self) then game.level.map:particleEmitter(self.x, self.y, math.max(math.abs(x-self.x), math.abs(y-self.y)), "mana_beam_wide", {tx=x-self.x, ty=y-self.y}) @@ -54,7 +55,7 @@ newTalent{ game.level.map:particleEmitter(self.x, self.y, math.max(math.abs(x-self.x), math.abs(y-self.y)), "mana_beam", {tx=x-self.x, ty=y-self.y}) end else - self:projectile(tg, x, y, DamageType.ARCANE, self:spellCrit(t.getDamage(self, t)), {type="manathrust"}) + self:projectile(tg, x, y, DamageType.ARCANE, dam, {type="manathrust"}) end game:playSoundNear(self, "talents/arcane") return true diff --git a/game/modules/tome/data/talents/spells/earth.lua b/game/modules/tome/data/talents/spells/earth.lua index cb788855bba6e5590a86d242d92fa259308a4d46..337d9cb08e986b6d2987a386665864f6c5d7b42a 100644 --- a/game/modules/tome/data/talents/spells/earth.lua +++ b/game/modules/tome/data/talents/spells/earth.lua @@ -54,7 +54,8 @@ newTalent{ end tg.range = self:getTalentRange(t) - self:project(tg, x, y, DamageType.PHYSICAL, self:spellCrit(t.getDamage(self, t)), nil) + local dam = thaumaturgyBeamDamage(self, self:spellCrit(t.getDamage(self, t))) + self:project(tg, x, y, DamageType.PHYSICAL, dam, nil) local _ _, x, y = self:canProject(tg, x, y) if thaumaturgyCheck(self) then game.level.map:particleEmitter(self.x, self.y, math.max(math.abs(x-self.x), math.abs(y-self.y)), "earth_beam_wide", {tx=x-self.x, ty=y-self.y}) diff --git a/game/modules/tome/data/talents/spells/fire.lua b/game/modules/tome/data/talents/spells/fire.lua index 785c5393aebd55d18e88ed8589da81e50223b42f..30813ba5b5fcf85f5b18dcd091970579a3538a59 100644 --- a/game/modules/tome/data/talents/spells/fire.lua +++ b/game/modules/tome/data/talents/spells/fire.lua @@ -46,20 +46,21 @@ newTalent{ if not x or not y then return nil end local grids = nil + local dam = thaumaturgyBeamDamage(self, self:spellCrit(t.getDamage(self, t))) if thaumaturgyCheck(self) then - grids = self:project(tg, x, y, DamageType.FIREBURN, self:spellCrit(t.getDamage(self, t))) + grids = self:project(tg, x, y, DamageType.FIREBURN, dam) local _ _, x, y = self:canProject(tg, x, y) game.level.map:particleEmitter(self.x, self.y, tg.radius, "flamebeam_wide", {tx=x-self.x, ty=y-self.y}) else if self:getTalentLevel(t) < 5 then - self:projectile(tg, x, y, DamageType.FIREBURN, self:spellCrit(t.getDamage(self, t)), function(self, tg, x, y, grids) + self:projectile(tg, x, y, DamageType.FIREBURN, dam, function(self, tg, x, y, grids) game.level.map:particleEmitter(x, y, 1, "flame") if self:attr("burning_wake") then game.level.map:addEffect(self, x, y, 4, engine.DamageType.INFERNO, self:attr("burning_wake"), 0, 5, nil, {type="inferno"}, nil, self:spellFriendlyFire()) end end) else - grids = self:project(tg, x, y, DamageType.FIREBURN, self:spellCrit(t.getDamage(self, t))) + grids = self:project(tg, x, y, DamageType.FIREBURN, dam) local _ _, x, y = self:canProject(tg, x, y) game.level.map:particleEmitter(self.x, self.y, tg.radius, "flamebeam", {tx=x-self.x, ty=y-self.y}) end diff --git a/game/modules/tome/data/talents/spells/spells.lua b/game/modules/tome/data/talents/spells/spells.lua index 48a1580f45e8002dfb6d0e1f0ee24dcf0f54a205..35f9f8db68c96f37ce6e4966cf59830aa9c81120 100644 --- a/game/modules/tome/data/talents/spells/spells.lua +++ b/game/modules/tome/data/talents/spells/spells.lua @@ -127,6 +127,11 @@ function thaumaturgyCheck(self) if inven[1].type ~= "armor" or inven[1].subtype ~= "cloth" then return false end return true end +function thaumaturgyBeamDamage(self, dam) + local v = self:attr("archmage_beam_dam_mult") + if not v then return dam end + return dam * (1 + v / 100) +end ------------------------------------------- -- Necromancer minions diff --git a/game/modules/tome/data/talents/spells/thaumaturgy.lua b/game/modules/tome/data/talents/spells/thaumaturgy.lua index 9f8b51737ed01933838e8d583b674c3020bbb387..884fb038aeea701a514ede7a1188c1d716069ed4 100644 --- a/game/modules/tome/data/talents/spells/thaumaturgy.lua +++ b/game/modules/tome/data/talents/spells/thaumaturgy.lua @@ -32,17 +32,18 @@ newTalent{ no_energy = true, target = function(self, t) return {type="hit", range=self:getTalentRange(t)} end, getDur = function(self, t) return math.floor(self:combatTalentScale(t, 2, 6)) end, + getDamPct = function(self, t) return math.floor(self:combatTalentLimit(t, 0, 80, 50)) end, action = function(self, t) local tg = self:getTalentTarget(t) local x, y = self:getTargetLimitedWallStop(tg) if not x or not y then return nil end - self:setEffect(self.EFF_ORB_OF_THAUMATURGY, t:_getDur(self), {x=x, y=y}) + self:setEffect(self.EFF_ORB_OF_THAUMATURGY, t:_getDur(self), {x=x, y=y, dam_pct=t:_getDamPct(self)}) return true end, info = function(self, t) return ([[You create an orb attuned to thaumaturgy for %d turns. - While it lasts, any beam spell you cast will be duplicated and also cast for free at the orb. - ]]):tformat(t:_getDur(self)) + While it lasts, any beam spell you cast will be duplicated and also cast for free at the orb for %d%% of the normal damage. + ]]):tformat(t:_getDur(self), 100 - t:_getDamPct(self)) end, } @@ -108,7 +109,7 @@ newTalent{ cooldown = 20, use_only_arcane = 5, tactical = { BUFF=1 }, - getNb = function(self, t) return math.floor(self:combatTalentScale(t, 3, 9)) end, + getNb = function(self, t) return math.floor(self:combatTalentScale(t, 2, 7)) end, iconOverlay = function(self, t, p) local val = p.charges if val <= 0 then return "" end @@ -200,7 +201,7 @@ newTalent{ local x, y = self:getTarget(tg) if not x or not y then return nil end - local dam = self:spellCrit(t.getDamage(self, t)) + local dam = thaumaturgyBeamDamage(self, self:spellCrit(t.getDamage(self, t))) local grids = self:project(tg, x, y, DamageType.THAUM, dam) if self:attr("burning_wake") and grids then diff --git a/game/modules/tome/data/talents/spells/water.lua b/game/modules/tome/data/talents/spells/water.lua index b51b844ee22f81c4b52705769c474aeb25b8111b..13875fb962457e635613b2f6650c60e698a489a6 100644 --- a/game/modules/tome/data/talents/spells/water.lua +++ b/game/modules/tome/data/talents/spells/water.lua @@ -40,15 +40,16 @@ newTalent{ local x, y = self:getTarget(tg) if not x or not y then return nil end + local dam = thaumaturgyBeamDamage(self, self:spellCrit(t.getDamage(self, t))) if thaumaturgyCheck(self) then - self:project(tg, x, y, DamageType.ICE, {chance=25, do_wet=true, dam=self:spellCrit(t.getDamage(self, t))}) + self:project(tg, x, y, DamageType.ICE, {chance=25, do_wet=true, dam=dam}) game.level.map:particleEmitter(self.x, self.y, tg.radius, "ice_beam_wide", {tx=x-self.x, ty=y-self.y}) else self:project(tg, x, y, function(px, py) local actor = game.level.map(px, py, Map.ACTOR) if actor and actor ~= self then local tg2 = {type="bolt", range=self:getTalentRange(t), talent=t, display={particle="arrow", particle_args={tile="particles_images/ice_shards"}}} - self:projectile(tg2, px, py, DamageType.ICE, {chance=25, do_wet=true, dam=self:spellCrit(t.getDamage(self, t))}, {type="freeze"}) + self:projectile(tg2, px, py, DamageType.ICE, {chance=25, do_wet=true, dam=dam}, {type="freeze"}) end end) end diff --git a/game/modules/tome/data/timed_effects/magical.lua b/game/modules/tome/data/timed_effects/magical.lua index 5e1ac1ab6748a7d6489f19b94689fae5caaa952f..8fd0618db8cfc71a7f2e034b0a42d224019f5da2 100644 --- a/game/modules/tome/data/timed_effects/magical.lua +++ b/game/modules/tome/data/timed_effects/magical.lua @@ -5343,9 +5343,9 @@ newEffect{ game:onTickEnd(function() local target = {x=eff.x, y=eff.y, __no_self=true} self._orb_of_thaumaturgy_recurs = target - print("==============+HERE!!!!") + self:attr("archmage_beam_dam_mult", -eff.dam_pct) self:forceUseTalent(t.id, {ignore_cooldown=true, ignore_ressources=true, ignore_energy=true, force_target=target}) - print("==============+DONE!!!!") + self:attr("archmage_beam_dam_mult", eff.dam_pct) self._orb_of_thaumaturgy_recurs = nil end) end,