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

for later

git-svn-id: http://svn.net-core.org/repos/t-engine4@5085 51575b47-30f0-44d4-a5cc-537603b46e54
parent ff7ea90d
No related branches found
No related tags found
No related merge requests found
......@@ -3018,7 +3018,7 @@ function _M:preUseTalent(ab, silent, fake)
return true
end
--- Called before a talent is used
--- Called after a talent is used
-- Check if it must use a turn, mana, stamina, ...
-- @param ab the talent (not the id, the table)
-- @param ret the return of the talent action
......@@ -3183,9 +3183,11 @@ end
function _M:forceUseTalent(t, def)
if def.no_equilibrium_fail then self:attr("no_equilibrium_fail", 1) end
if def.no_paradox_fail then self:attr("no_paradox_fail", 1) end
if def.talent_reuse then self:attr("talent_reuse", 1) end
local ret = {engine.interface.ActorTalents.forceUseTalent(self, t, def)}
if def.no_equilibrium_fail then self:attr("no_equilibrium_fail", -1) end
if def.no_paradox_fail then self:attr("no_paradox_fail", -1) end
if def.talent_reuse then self:attr("talent_reuse", -1) end
return unpack(ret)
end
......
......@@ -157,7 +157,7 @@ newTalent{
return ([[Chant the glory of the moon, granting you %d%% stun, blindness and confusion resistances.
In addition it surrounds you with a shield of darkness, damaging anything that attacks you for %0.2f darkness damage.
You may only have one Hymn active at once.
The resistances and damage will increase with the Magic stat]]):
The damage will increase with the Magic stat]]):
format(100 * (immunities), damDesc(self, DamageType.DARKNESS, darknessdamage))
end,
}
......
......@@ -482,7 +482,7 @@ function _M:finish()
end
for i, tid in ipairs(reset) do
self.actor:forceUseTalent(tid, {ignore_energy=true, ignore_cd=true, no_equilibrium_fail=true, no_paradox_fail=true})
if self.actor:knowTalent(tid) then self.actor:forceUseTalent(tid, {ignore_energy=true, ignore_cd=true, no_equilibrium_fail=true, no_paradox_fail=true}) end
if self.actor:knowTalent(tid) then self.actor:forceUseTalent(tid, {ignore_energy=true, ignore_cd=true, no_equilibrium_fail=true, no_paradox_fail=true, talent_reuse=true}) end
end
if not self.on_birth then
......
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