Skip to content
Snippets Groups Projects
Commit d0fb3beb authored by dg's avatar dg
Browse files

it's the eye of the tiger it's the htrill of the fight ...

git-svn-id: http://svn.net-core.org/repos/t-engine4@5571 51575b47-30f0-44d4-a5cc-537603b46e54
parent 0ca933da
No related branches found
No related tags found
No related merge requests found
......@@ -1245,6 +1245,7 @@ function _M:physicalCrit(dam, weapon, target, atk, def, add_chance, crit_power_a
dam = dam * (1.5 + crit_power_add + (self.combat_critical_power or 0) / 100)
crit = true
if self:knowTalent(self.T_EYE_OF_THE_TIGER) then self:triggerTalent(self.T_EYE_OF_THE_TIGER, nil, "physical") end
end
return dam, crit
end
......@@ -1286,6 +1287,8 @@ function _M:spellCrit(dam, add_chance, crit_power_add)
local t = self:getTalentFromId(self.T_CORONA)
t.on_crit(self, t)
end
if self:knowTalent(self.T_EYE_OF_THE_TIGER) then self:triggerTalent(self.T_EYE_OF_THE_TIGER, nil, "spell") end
end
return dam, crit
end
......@@ -1311,6 +1314,7 @@ function _M:mindCrit(dam, add_chance, crit_power_add)
if self:attr("psi_on_crit") then self:incPsi(self:attr("psi_on_crit")) end
if self:attr("equilibrium_on_crit") then self:incEquilibrium(self:attr("equilibrium_on_crit")) end
if self:knowTalent(self.T_EYE_OF_THE_TIGER) then self:triggerTalent(self.T_EYE_OF_THE_TIGER, nil, "mind") end
end
return dam, crit
end
......
......@@ -176,3 +176,51 @@ uberTalent{
:format(self:getCun() / 2.5, self:getCun() / 2, self:getCun() / 2.5, self:getCun() / 2)
end,
}
uberTalent{
name = "Eye of the Tiger",
mode = "passive",
trigger = function(self, t, kind)
local tids = {}
for tid, _ in pairs(self.talents_cd) do
local t = self:getTalentFromId(tid)
if
(kind == "physical" and
(
t.type[1]:find("^technique/") or
t.type[1]:find("^cunning/")
)
) or
(kind == "spell" and
(
t.type[1]:find("^spell/") or
t.type[1]:find("^corruption/") or
t.type[1]:find("^celestial/") or
t.type[1]:find("^chronomancy/")
)
) or
(kind == "mind" and
(
t.type[1]:find("^wild%-gift/") or
t.type[1]:find("^cursed/") or
t.type[1]:find("^psionic/")
)
)
then
tids[#tids+1] = tid
end
end
if #tids == 0 then return end
local tid = rng.table(tids)
self.talents_cd[tid] = self.talents_cd[tid] - (kind == "spell" and 1 or 2)
if self.talents_cd[tid] <= 0 then self.talents_cd[tid] = nil end
self.changed = true
end,
info = function(self, t)
return ([[All physical criticals reduce the remaining cooldown of a random technique or cunning talent by 2.
All spell criticals reduce the remaining cooldown of a random spell talent by 1.
All mind criticals reduce the remaining cooldown of a random wild gift/psionic/afflicted talent by 2.]])
:format()
end,
}
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