Skip to content
Snippets Groups Projects
Commit 34e9142e authored by DarkGod's avatar DarkGod
Browse files

Armour of Shadows give 20% evasion when on unlit tile

parent ad9ecad1
No related branches found
No related tags found
No related merge requests found
......@@ -347,10 +347,14 @@ end
--- Try to totally evade an attack
function _M:checkEvasion(target)
if not target:attr("evasion") or self == target then return end
if target:attr("no_evasion") then return end
local evasion = target:attr("evasion")
if target:knowTalent(target.T_ARMOUR_OF_SHADOWS) and not game.level.map.lites(target.x, target.y) then
evasion = (evasion or 0) + 20
end
if not evasion or self == target then return end
if target:attr("no_evasion") then return end
print("checkEvasion", evasion, target.level, self.level)
print("=> evasion chance", evasion)
return rng.percent(evasion)
......
......@@ -112,7 +112,7 @@ uberTalent{
self:attr("darkness_darkens", -1)
end,
info = function(self, t)
return ([[You know how to protect yourself with the deepest shadows. As long as you stand on an unlit tile you gain %d armour and 50%% armour hardiness.
return ([[You know how to protect yourself with the deepest shadows. As long as you stand on an unlit tile you gain %d armour, 50%% armour hardiness and 20%% evasion.
Any time you deal darkness damage, you will unlight both the target tile and yours.
The armor bonus scales with your Constitution.]])
:format(t.ArmourBonus(self,t))
......
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