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

Augmentation updates with each stats change and has a small cooldown

parent 6a6b65cf
No related branches found
No related tags found
No related merge requests found
......@@ -5329,7 +5329,7 @@ function _M:postUseTalent(ab, ret, silent)
end
end
-- deduct resource costs
if not self:attr("force_talent_ignore_ressources") and not ab.fake_ressource and not self:attr("zero_resource_cost") and (not self.talent_no_resources or not self.talent_no_resources[ab.id]) not self:isTalentActive(ab.id) then
if not self:attr("force_talent_ignore_ressources") and not ab.fake_ressource and not self:attr("zero_resource_cost") and (not self.talent_no_resources or not self.talent_no_resources[ab.id]) and not self:isTalentActive(ab.id) then
local rname, cost
if ab.feedback then -- pseudo resource
......
......@@ -71,20 +71,30 @@ newTalent{
require = psi_cun_req2,
points = 5,
mode = "sustained",
cooldown = 0,
cooldown = 15,
sustain_psi = 10,
no_energy = true,
tactical = { BUFF = 2 },
getMult = function(self, t) return self:combatTalentScale(t, 0.1, 0.3) end,
activate = function(self, t)
recomputeStats = function(self, t, p)
if p.stats then self:removeTemporaryValue("inc_stats", p.stats) end
local str_power = math.ceil(t.getMult(self, t)*self:getWil())
local dex_power = math.ceil(t.getMult(self, t)*self:getCun())
return {
stats = self:addTemporaryValue("inc_stats", {
[self.STAT_STR] = str_power,
[self.STAT_DEX] = dex_power,
}),
}
p.stats = self:addTemporaryValue("inc_stats", {
[self.STAT_STR] = str_power,
[self.STAT_DEX] = dex_power,
})
end,
callbackOnStatChange = function(self, t, stat, v)
local p = self:isTalentActive(t.id)
if p and (stat == self.STAT_WIL or stat == self.STAT_CUN) then
t.recomputeStats(self, t, p)
end
end,
activate = function(self, t)
local ret = {}
t.recomputeStats(self, t, ret)
return ret
end,
deactivate = function(self, t, p)
self:removeTemporaryValue("inc_stats", p.stats)
......
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