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

rune of reflection worsk with grisly constitution

parent 2ae54751
No related branches found
No related tags found
No related merge requests found
......@@ -157,6 +157,10 @@ newEntity{ base = "BASE_RUNE", define_as = "RUNE_REFLECT",
inscription_kind = "protect",
inscription_data = {
cooldown = 15,
dur = 5,
power = 100,
use_stat_mod = 5,
use_stat = "mag",
},
inscription_talent = "RUNE:_REFLECTION_SHIELD",
}
......
......@@ -510,17 +510,23 @@ newInscription{
end,
action = function(self, t)
local data = self:getInscriptionData(t.short_name)
self:setEffect(self.EFF_DAMAGE_SHIELD, 5, {power=100+5*self:getMag(), reflect=100})
local power = 100+5*self:getMag()
if data.power and data.inc_stat then power = data.power + data.inc_stat end
self:setEffect(self.EFF_DAMAGE_SHIELD, data.dur or 5, {power=power, reflect=100})
return true
end,
info = function(self, t)
local data = self:getInscriptionData(t.short_name)
local power = 100+5*self:getMag()
if data.power and data.inc_stat then power = data.power + data.inc_stat end
return ([[Activate the rune to create a protective shield absorbing and reflecting at most %d damage for %d turns.
The effect will scale with your magic stat.]]):format(100+5*self:getMag(), 5)
The effect will scale with your magic stat.]]):format(power, data.dur or 5)
end,
short_info = function(self, t)
local data = self:getInscriptionData(t.short_name)
return ([[absorb and reflect %d for %d turns]]):format(100+5*self:getMag(), 5)
local power = 100+5*self:getMag()
if data.power and data.inc_stat then power = data.power + data.inc_stat end
return ([[absorb and reflect %d for %d turns]]):format(power, data.dur or 5)
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