From 692a8257eb179800602e4d9456aa79676722b0f7 Mon Sep 17 00:00:00 2001 From: DarkGod <darkgod@net-core.org> Date: Wed, 5 Aug 2020 01:50:52 +0200 Subject: [PATCH] Swapped talents that used callbackOnActBase for life threshold checks to callbackOnAct so tha they account for faster players --- game/modules/tome/class/Game.lua | 1 + game/modules/tome/data/talents/spells/age-of-dusk.lua | 2 +- game/modules/tome/data/talents/spells/eradication.lua | 1 + game/modules/tome/data/talents/spells/glacial-waste.lua | 7 ++++--- game/modules/tome/data/talents/spells/necrosis.lua | 4 ++-- 5 files changed, 9 insertions(+), 6 deletions(-) diff --git a/game/modules/tome/class/Game.lua b/game/modules/tome/class/Game.lua index 7f0ff68ae0..40d881b472 100644 --- a/game/modules/tome/class/Game.lua +++ b/game/modules/tome/class/Game.lua @@ -2036,6 +2036,7 @@ function _M:setupCommands() end end, [{"_g","ctrl"}] = function() if config.settings.cheat then game.player:takeHit(100, game.player) + game.player:useEnergy() -- DamageType:get(DamageType.ACID).projector(game.player, game.player.x, game.player.y, DamageType.ACID, 100) do return end game.player:setEffect("EFF_STUNNED", 1, {apply_power=200}) diff --git a/game/modules/tome/data/talents/spells/age-of-dusk.lua b/game/modules/tome/data/talents/spells/age-of-dusk.lua index e4e0ee1285..ee31468921 100644 --- a/game/modules/tome/data/talents/spells/age-of-dusk.lua +++ b/game/modules/tome/data/talents/spells/age-of-dusk.lua @@ -130,7 +130,7 @@ newTalent{ tactical = { BUFF = 2 }, getImmune = function(self, t) return math.floor(self:combatTalentLimit(t, 100, 20, 50)) end, getSaves = function(self, t) return math.floor(self:combatTalentScale(t, 10, 55)) end, - callbackOnActBase = checkLifeThreshold(1, function(self, t) + callbackOnAct = checkLifeThreshold(1, function(self, t) if self:getTalentLevel(t) < 5 then return end self:setEffect(self.EFF_GOLDEN_AGE_OF_NECROMANCY, 1, {}) return true diff --git a/game/modules/tome/data/talents/spells/eradication.lua b/game/modules/tome/data/talents/spells/eradication.lua index 6a2997ab41..1dc98d37db 100644 --- a/game/modules/tome/data/talents/spells/eradication.lua +++ b/game/modules/tome/data/talents/spells/eradication.lua @@ -187,6 +187,7 @@ newTalent{ getDamageIncrease = function(self, t) return self:combatTalentScale(t, 2.5, 10) end, getResistPenalty = function(self, t) return self:combatTalentLimit(t, 100, 17, 50, true) end, getVampiric = function(self, t) return math.floor(self:combatTalentLimit(t, 60, 3, 8)) end, + callbackPriorities={callbackOnActBase = 100}, -- trigger after most others callbackOnActBase = function(self, t) local p = self:isTalentActive(t.id) if not p then return end if p.cur_value > 0 then self:heal(p.cur_value, self) end diff --git a/game/modules/tome/data/talents/spells/glacial-waste.lua b/game/modules/tome/data/talents/spells/glacial-waste.lua index d2c1f6a2a2..32aff638a4 100644 --- a/game/modules/tome/data/talents/spells/glacial-waste.lua +++ b/game/modules/tome/data/talents/spells/glacial-waste.lua @@ -49,7 +49,7 @@ newTalent{ ret.waste_counter = 0 end end, - callbackOnActBase = checkLifeThreshold(1, function(self, t) + callbackOnAct = checkLifeThreshold(1, function(self, t) local p = self:isTalentActive(t.id) if not p then return end @@ -63,7 +63,8 @@ newTalent{ p.crit_id = nil end end - end, function(self, t) + end), + callbackOnActBase = function(self, t) local p = self:isTalentActive(t.id) if not p then return end @@ -83,7 +84,7 @@ newTalent{ self:incSoul(-soul) end end - end), + end, callbackOnCombat = function(self, t, state) local p = self:isTalentActive(t.id) if not p then return end diff --git a/game/modules/tome/data/talents/spells/necrosis.lua b/game/modules/tome/data/talents/spells/necrosis.lua index 8b1251b2c5..ea914781ac 100644 --- a/game/modules/tome/data/talents/spells/necrosis.lua +++ b/game/modules/tome/data/talents/spells/necrosis.lua @@ -35,7 +35,7 @@ newTalent{ callbackOnStatChange = function(self, t, stat, v) if stat == self.STAT_CON then self:updateTalentPassives(t) end end, - callbackOnActBase = checkLifeThreshold(1, function(self, t) + callbackOnAct = checkLifeThreshold(1, function(self, t) self:updateTalentPassives(t) end), passives = function(self, t, p) @@ -66,7 +66,7 @@ newTalent{ radius = function(self, t) return self:combatTalentLimit(t, 10, 2, 6) end, getCD = function(self, t) return math.ceil(self:combatTalentLimit(t, 12, 2, 8)) end, getDamage = function(self, t) return self:combatTalentSpellDamage(t, 30, 260) end, - callbackOnActBase = checkLifeThreshold(1, function(self, t) + callbackOnAct = checkLifeThreshold(1, function(self, t) local list = {} for tid, c in pairs(self.talents_cd) do local t = self:getTalentFromId(tid) -- GitLab