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

Spectral Shield now requires having cast 100 spells

git-svn-id: http://svn.net-core.org/repos/t-engine4@5925 51575b47-30f0-44d4-a5cc-537603b46e54
parent 1d379e9e
No related branches found
No related tags found
No related merge requests found
......@@ -3547,6 +3547,13 @@ function _M:postUseTalent(ab, ret)
self.changed = true
if self.talent_kind_log then
if ab.is_spell then self.talent_kind_log.spell = (self.talent_kind_log.spell or 0) + 1 end
if ab.is_summon then self.talent_kind_log.summon = (self.talent_kind_log.summon or 0) + 1 end
if ab.is_mind then self.talent_kind_log.mind = (self.talent_kind_log.mind or 0) + 1 end
if ab.is_nature then self.talent_kind_log.nature = (self.talent_kind_log.nature or 0) + 1 end
end
-- Handle inscriptions (delay it so it does not affect current inscription)
game:onTickEnd(function()
if ab.type[1] == "inscriptions/infusions" then
......
......@@ -93,6 +93,7 @@ function _M:init(t, no_default)
self.puuid = self.puuid or util.uuid()
self.damage_log = self.damage_log or {weapon={}}
self.talent_kind_log = self.talent_kind_log or {}
end
function _M:onBirth(birther)
......
......@@ -20,20 +20,17 @@
uberTalent{
name = "Spectral Shield",
mode = "passive",
require = { special={desc="Block talent, have mana and a block value over 200.", fct=function(self)
return self:knowTalent(self.T_BLOCK) and self:getTalentFromId(self.T_BLOCK).getBlockValue(self) >= 200 and self:getMaxMana() >= 70
require = { special={desc="Block talent, have cast at least 100 spells and a block value over 200.", fct=function(self)
return self:knowTalent(self.T_BLOCK) and self:getTalentFromId(self.T_BLOCK).getBlockValue(self) >= 200 and self.talent_kind_log and self.talent_kind_log.spell and self.talent_kind_log.spell >= 100
end} },
on_learn = function(self, t)
self:attr("spectral_shield", 1)
self:attr("max_mana", -70)
end,
on_unlearn = function(self, t)
self:attr("spectral_shield", -1)
self:attr("max_mana", 70)
end,
info = function(self, t)
return ([[Infusing your shield with raw magic your Block can now block any damage type
Your maximum mana will be premanently reduced by 70 to create the effect.]])
return ([[Infusing your shield with raw magic your Block can now block any damage type.]])
:format()
end,
}
......@@ -46,18 +43,15 @@ uberTalent{
end} },
on_learn = function(self, t)
local ret = {}
self:attr("max_mana", -70)
self:talentTemporaryValue(ret, "force_use_resist", DamageType.ARCANE)
self:talentTemporaryValue(ret, "force_use_resist_percent", 50)
return ret
end,
on_unlearn = function(self, t)
self:attr("max_mana", 70)
end,
info = function(self, t)
return ([[Create a thin layer of aether all around you. Any attack passing through will check arcane resistance instead of the incomming damage resistance.
In effect all your resistances are equal to 50%% of your arcane resistance.
Your maximum mana will be premanently reduced by 70 to create the effect.]])
In effect all your resistances are equal to 50%% of your arcane resistance.]])
: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