From d66913b2669c62a9bb8b7fe501fff1799231a01d Mon Sep 17 00:00:00 2001 From: Eric Wykoff <ericwykoff@yahoo.com> Date: Mon, 23 Mar 2015 11:56:45 -0500 Subject: [PATCH] Spacetime Tuning now tunes a flat amoutn each turn Reduced damage on Temporal Hounds a bit --- game/modules/tome/class/Actor.lua | 2 +- game/modules/tome/class/Player.lua | 2 +- .../tome/data/talents/chronomancy/other.lua | 26 +++++++++++-------- .../tome/data/talents/chronomancy/stasis.lua | 14 ++++------ .../modules/tome/data/timed_effects/other.lua | 4 +-- 5 files changed, 23 insertions(+), 25 deletions(-) diff --git a/game/modules/tome/class/Actor.lua b/game/modules/tome/class/Actor.lua index 23548465e3..27bffefbd0 100644 --- a/game/modules/tome/class/Actor.lua +++ b/game/modules/tome/class/Actor.lua @@ -1377,7 +1377,7 @@ function _M:waitTurn() -- Tune paradox up or down if not self:hasEffect(self.EFF_SPACETIME_TUNING) and self:knowTalent(self.T_SPACETIME_TUNING) then - self:callTalent(self.T_SPACETIME_TUNING, "doTuning") + self:callTalent(self.T_SPACETIME_TUNING, "startTuning") end self:useEnergy() diff --git a/game/modules/tome/class/Player.lua b/game/modules/tome/class/Player.lua index 61d068c77b..53a1cfaea2 100644 --- a/game/modules/tome/class/Player.lua +++ b/game/modules/tome/class/Player.lua @@ -907,7 +907,7 @@ function _M:onRestStart() self.resting.mana_regen = self:attr("mana_regen_on_rest") end if self:knowTalent(self.T_SPACETIME_TUNING) then - self:callTalent(self.T_SPACETIME_TUNING, "doTuning") + self:callTalent(self.T_SPACETIME_TUNING, "startTuning") end self:fireTalentCheck("callbackOnRest", "start") end diff --git a/game/modules/tome/data/talents/chronomancy/other.lua b/game/modules/tome/data/talents/chronomancy/other.lua index df003b5ead..275e10af80 100644 --- a/game/modules/tome/data/talents/chronomancy/other.lua +++ b/game/modules/tome/data/talents/chronomancy/other.lua @@ -29,23 +29,27 @@ newTalent{ on_learn = function(self, t) if not self.preferred_paradox then self.preferred_paradox = 300 end end, - getDuration = function(self, t) - local duration = 20 + getTuning = function(self, t) + local value = 5 + -- factor spacetime stability in directly so our duration is set correctly if self:knowTalent(self.T_SPACETIME_STABILITY) then - duration = duration - self:callTalent(self.T_SPACETIME_STABILITY, "getTuningAdjustment") + value = value + self:callTalent(self.T_SPACETIME_STABILITY, "getTuning") end - return math.max(duration, 10) + return value end, - doTuning = function(self, t) + startTuning = function(self, t) if self.preferred_paradox and (self:getParadox() ~= self:getMinParadox() or self.preferred_paradox > self:getParadox())then - local power = 0 + local power = t.getTuning(self, t) if math.abs(self:getParadox() - self.preferred_paradox) > 1 then - local duration = self:callTalent(self.T_SPACETIME_TUNING, "getDuration") - power = (self.preferred_paradox - self:getParadox())/duration + local duration = (self.preferred_paradox - self:getParadox())/power + if duration < 0 then duration = math.abs(duration); power = power - (power*2) end self:setEffect(self.EFF_SPACETIME_TUNING, duration, {power=power}) end end end, + tuneParadox = function(self, t) + tuneParadox(self, t, t.getTuning(self, t)) + end, action = function(self, t) local function getQuantity(title, prompt, default, min, max) local result @@ -80,13 +84,13 @@ newTalent{ return true end, info = function(self, t) - local duration = t.getDuration(self, t) + local tune = t.getTuning(self, t) local preference = self.preferred_paradox local sp_modifier = getParadoxModifier(self, t) * 100 local spellpower = getParadoxSpellpower(self, t) local after_will, will_modifier, sustain_modifier = self:getModifiedParadox() local anomaly = self:paradoxFailChance() - return ([[Use to set your preferred Paradox. While resting or waiting you'll adjust your Paradox towards this number over %d turns. + return ([[Use to set your preferred Paradox. While resting or waiting you'll adjust your Paradox towards this number at the rate of %d per turn. Your Paradox modifier is factored into the duration and spellpower of all chronomancy spells. Preferred Paradox : %d @@ -95,7 +99,7 @@ newTalent{ Willpower Paradox Modifier : -%d Paradox Sustain Modifier : +%d Total Modifed Paradox : %d - Current Anomaly Chance : %d%%]]):format(duration, preference, sp_modifier, spellpower, will_modifier, sustain_modifier, after_will, anomaly) + Current Anomaly Chance : %d%%]]):format(tune, preference, sp_modifier, spellpower, will_modifier, sustain_modifier, after_will, anomaly) end, } diff --git a/game/modules/tome/data/talents/chronomancy/stasis.lua b/game/modules/tome/data/talents/chronomancy/stasis.lua index d7ef3bedfd..a745368185 100644 --- a/game/modules/tome/data/talents/chronomancy/stasis.lua +++ b/game/modules/tome/data/talents/chronomancy/stasis.lua @@ -25,20 +25,16 @@ newTalent{ require = chrono_req1, mode = "passive", points = 5, - getTuningAdjustment = function(self, t) - local duration = math.floor(self:combatTalentScale(t, 2, 8)) - return math.min(duration, 10) - end, getTuning = function(self, t) return 1 + self:combatTalentLimit(t, 6, 0, 3) end, callbackOnActBase = function(self, t) - tuneParadox(self, t, t.getTuning(self, t)) + if not self:hasEffect(self.EFF_SPACETIME_TUNING) then + tuneParadox(self, t, t.getTuning(self, t)) + end end, info = function(self, t) local tune = t.getTuning(self, t) - local duration = t.getTuningAdjustment(self, t) - return ([[When Spacetime Tuning is inactive you automatically adjust your Paradox %0.2f points towards your preferred Paradox each turn. - The time it takes you to adjust your Paradox with Spacetime Tuning is also reduced by %d turns.]]): - format(tune, duration) + return ([[You automatically adjust your Paradox %0.2f points towards your preferred Paradox each turn.]]): + format(tune) end, } diff --git a/game/modules/tome/data/timed_effects/other.lua b/game/modules/tome/data/timed_effects/other.lua index ec50ac2cce..f45b5f39d1 100644 --- a/game/modules/tome/data/timed_effects/other.lua +++ b/game/modules/tome/data/timed_effects/other.lua @@ -2406,9 +2406,7 @@ newEffect{ parameters = { power=10}, on_gain = function(self, err) return "#Target# retunes the fabric of spacetime.", "+Spacetime Tuning" end, on_timeout = function(self, eff) - local dox = self:getParadox() - self.preferred_paradox - local fix = math.min( math.abs(dox), eff.power ) - self:incParadox(fix) + self:callTalent(self.T_SPACETIME_TUNING, "tuneParadox") end, activate = function(self, eff) if core.shader.active(4) then -- GitLab