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

Hiemal Shield only affects 66.6% of the incomming damage when above 1 life, 100% when under

parent 70ceabb1
No related branches found
No related tags found
No related merge requests found
......@@ -2032,6 +2032,7 @@ function _M:setupCommands()
end end,
[{"_g","ctrl"}] = function() if config.settings.cheat then
game.player:takeHit(100, game.player)
-- DamageType:get(DamageType.ACID).projector(game.player, game.player.x, game.player.y, DamageType.ACID, 100)
do return end
game.player:setEffect("EFF_STUNNED", 1, {apply_power=200})
do return end
......
......@@ -97,18 +97,20 @@ newTalent{
local p = self:isTalentActive(t.id)
if not p then return end
if cb.value <= 0 then return end
local cbvalue = cb.value
if self.life >= 1 then cbvalue = cb.value * 0.666 end
local reduce = 0
if self:knowTalent(self.T_BLEAK_GUARD) then
reduce = self:callTalent(self.T_BLEAK_GUARD, "getReduce")
end
reduce = (100 - reduce) / 100
local rvalue = cb.value * reduce
local rvalue = cbvalue * reduce
if rvalue <= p.shield then
game:delayedLogDamage(src, self, 0, ("#SLATE#(%d absorbed)#LAST#"):tformat(cb.value), false)
game:delayedLogDamage(src, self, 0, ("#SLATE#(%d absorbed)#LAST#"):tformat(cbvalue), false)
p.shield = p.shield - rvalue
cb.value = 0
cbvalue = 0
if p.waste_counter then
p.waste_counter = p.waste_counter + rvalue / p.original_shield
......@@ -120,7 +122,7 @@ newTalent{
end
else
game:delayedLogDamage(src, self, 0, ("#SLATE#(%d absorbed)#LAST#"):tformat(p.shield), false)
cb.value = (rvalue - p.shield) / reduce
cbvalue = (rvalue - p.shield) / reduce
p.shield = 0
end
p.been_used = true
......@@ -135,6 +137,9 @@ newTalent{
-- Deactivate without losing energy
self:forceUseTalent(t.id, {ignore_energy=true})
end
if self.life >= 1 then cb.value = cb.value * (1-0.666) + cbvalue
else cb.value = cbvalue end
return true
end,
activate = function(self, t)
......@@ -158,7 +163,8 @@ newTalent{
info = function(self, t)
return ([[Conjure a shield of ice around you that can absorbs a total of %d damage.
Anytime it does it retaliates by sending a bolt of ice at the attacker, dealing %0.2f cold damage (this can only happen once per turn per creature).
When you are under 1 life it also reduces the damage of critical hits by %d%%.
When you are above 1 life it only affects 66.6%% of the damage, letting through the rest.
When you are under 1 life it affects 100%% of the damage and also reduces the damage of critical hits by %d%%.
10 turns after leaving combat the shield will consume its mana and soul cost again to fully regenerate if needed. if that cost can not be matched, it unsustains.
The shield strength will increase with your Spellpower.]]):
tformat(t:_getMaxAbsorb(self), damDesc(self, DamageType.COLD, t:_getDamage(self)), t:_getCritResist(self))
......
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