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

Manasurge runes will regen mana while resting even for those without natural manaregen


git-svn-id: http://svn.net-core.org/repos/t-engine4@5887 51575b47-30f0-44d4-a5cc-537603b46e54
parent 931dde17
No related branches found
No related tags found
No related merge requests found
......@@ -673,6 +673,10 @@ function _M:onRestStart()
self:attr("equilibrium_regen", self:attr("equilibrium_regen_on_rest"))
self.resting.equilibrium_regen = self:attr("equilibrium_regen_on_rest")
end
if self.resting and self:attr("mana_regen_on_rest") and not self.resting.mana_regen then
self:attr("mana_regen", self:attr("mana_regen_on_rest"))
self.resting.mana_regen = self:attr("mana_regen_on_rest")
end
end
--- We stopped resting
......@@ -681,6 +685,10 @@ function _M:onRestStop()
self:attr("equilibrium_regen", -self.resting.equilibrium_regen)
self.resting.equilibrium_regen = nil
end
if self.resting and self.resting.mana_regen then
self:attr("mana_regen", -self.resting.mana_regen)
self.resting.mana_regen = nil
end
end
--- Can we continue resting ?
......
......@@ -712,6 +712,12 @@ newInscription{
on_pre_use = function(self, t)
return self:knowTalent(self.T_MANA_POOL) and not self:hasEffect(self.EFF_MANASURGE)
end,
on_learn = function(self, t)
self.mana_regen_on_rest = (self.mana_regen_on_rest or 0) + 0.5
end,
on_unlearn = function(self, t)
self.mana_regen_on_rest = (self.mana_regen_on_rest or 0) - 0.5
end,
action = function(self, t)
local data = self:getInscriptionData(t.short_name)
self:incMana((data.mana + data.inc_stat) / 20)
......@@ -728,7 +734,8 @@ newInscription{
end,
info = function(self, t)
local data = self:getInscriptionData(t.short_name)
return ([[Activate the rune to unleash a manasurge upon yourself, increasing mana regeneration by %d%% over %d turns and instantly restoring %d mana.]]):format(data.mana + data.inc_stat, data.dur, (data.mana + data.inc_stat) / 20)
return ([[Activate the rune to unleash a manasurge upon yourself, increasing mana regeneration by %d%% over %d turns and instantly restoring %d mana.
Also when resting your mana will regenerate at 0.5 per turn.]]):format(data.mana + data.inc_stat, data.dur, (data.mana + data.inc_stat) / 20)
end,
short_info = function(self, t)
local data = self:getInscriptionData(t.short_name)
......
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