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

Swift Hands removes the cooldown penalty from swapping items

git-svn-id: http://svn.net-core.org/repos/t-engine4@5917 51575b47-30f0-44d4-a5cc-537603b46e54
parent 921d1d49
No related branches found
No related tags found
No related merge requests found
......@@ -1181,10 +1181,10 @@ function _M:onWear(o, bypass_set)
so.power = 0
end
end
if so.talent_cooldown then
if so.talent_cooldown and (not self:attr("quick_equip_cooldown") or self:attr("quick_equip_cooldown") > 1) then
self.talents_cd[so.talent_cooldown] = math.max(self.talents_cd[so.talent_cooldown] or 0, math.min(4, math.floor((so.use_power or so.use_talent or {power=10}).power / 5)))
if self:attr("quick_equip_cooldown") then
self.talents_cd[so.talent_cooldown] = math.floor(self.talents_cd[so.talent_cooldown] / 2)
self.talents_cd[so.talent_cooldown] = math.floor(self.talents_cd[so.talent_cooldown] / self:attr("quick_equip_cooldown"))
if self.talents_cd[so.talent_cooldown] <= 0 then self.talents_cd[so.talent_cooldown] = nil end
end
end
......
......@@ -40,15 +40,15 @@ uberTalent{
mode = "passive",
on_learn = function(self, t)
self:attr("quick_weapon_swap", 1)
self:attr("quick_equip_cooldown", 2)
self:attr("quick_equip_cooldown", 1)
end,
on_unlearn = function(self, t)
self:attr("quick_weapon_swap", -1)
self:attr("quick_equip_cooldown", -2)
self:attr("quick_equip_cooldown", -1)
end,
info = function(self, t)
return ([[You have very agile hands, swaping equipment sets (default x key) takes no turn.
Also the cooldown for equiping activable equipment is reduced by half.]])
return ([[You have very agile hands, swaping equipment sets (default q key) takes no turn.
Also the cooldown for equiping activable equipment is removed.]])
: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