Skip to content
Snippets Groups Projects
Commit ed4cb82d authored by Eric Wykoff's avatar Eric Wykoff
Browse files

seal fate now creates spin when you damage a target

parent e1bf5b53
No related branches found
No related tags found
1 merge request!107Chrono talent balance
......@@ -361,10 +361,6 @@ setDefaultProjector(function(src, x, y, type, dam, state)
print("[PROJECTOR] after Roll With It dam", dam)
end
if src and src.hasEffect and src:hasEffect(src.EFF_SEAL_FATE) then
src:callEffect(src.EFF_SEAL_FATE, "doDamage", target)
end
if target:attr("resist_unseen") and not target:canSee(src) then
dam = dam * (1 - math.min(target.resist_unseen,100)/100)
end
......
......@@ -27,25 +27,19 @@ newTalent{
points = 5,
getSaveBonus = function(self, t) return math.ceil(self:combatTalentScale(t, 2, 8, 0.75)) end,
getMaxSpin = function(self, t) return self:hasEffect(self.EFF_WEBS_OF_FATE) and 6 or 3 end,
doSpin = function(self, t)
self:setEffect(self.EFF_SPIN_FATE, 3, {save_bonus=t.getSaveBonus(self, t), spin=1, max_spin=t.getMaxSpin(self, t)})
-- Fateweaver
if self:knowTalent(self.T_FATEWEAVER) then
self:callTalent(self.T_FATEWEAVER, "doFateweaver")
end
end,
callbackOnTakeDamage = function(self, t, src, x, y, type, dam, tmp)
if dam > 0 and src ~= self then
if self.turn_procs and not self.turn_procs.spin_fate then
self:setEffect(self.EFF_SPIN_FATE, 3, {save_bonus=t.getSaveBonus(self, t), spin=1, max_spin=t.getMaxSpin(self, t)})
if self:knowTalent(self.T_FATEWEAVER) then
self:callTalent(self.T_FATEWEAVER, "doFateweaver")
end
-- Set our turn procs, we do spin_fate last since it's the only one checked above
if self.hasEffect and self:hasEffect(self.EFF_WEBS_OF_FATE) and not self.turn_procs.spin_webs then
self.turn_procs.spin_webs = true
elseif self.hasEffect and self:hasEffect(self.EFF_SEAL_FATE) and not self.turn_procs.spin_seal then
self.turn_procs.spin_seal = true
else
self.turn_procs.spin_fate = true
end
t.doSpinFate(self, t)
self.turn_procs.spin_fate = true
end
end
......@@ -77,9 +71,9 @@ newTalent{
info = function(self, t)
local procs = t.getProcs(self, t)
local duration = t.getDuration(self, t)
return ([[Activate to Seal Fate for %d turns. When you damage a target while Seal Fate is active you have a 50%% chance to increase the duration of one detrimental status effect on it by one turn.
return ([[Activate to Seal Fate for %d turns. When you damage a target while Seal Fate is active you gain Spin and have a 50%% chance to increase the duration of one detrimental status effect on it by one turn.
If you have Spin Fate active the chance will be increased by 33%% per Spin (to a maximum of 100%% at three Spin.)
This can occur at most %d times per turn. While Seal Fate is active you may gain one additional spin per turn.]]):format(duration, procs)
The duration increase can occur %d times per turn.]]):format(duration, procs)
end,
}
......
......@@ -3056,6 +3056,13 @@ newEffect{
on_lose = function(self, err) return nil, "-Webs of Fate" end,
parameters = { power=0.1 },
callbackOnTakeDamage = function(self, eff, src, x, y, type, dam, tmp)
-- Spin Fate?
if self.turn_procs and not self.turn_procs.spin_webs then
self.turn_procs.spin_webs = true
self:callTalent(self.T_SPIN_FATE, "doSpin")
end
-- Displace Damage?
local t = eff.talent
if dam > 0 and src ~= self then
-- find available targets
......@@ -3077,7 +3084,7 @@ newEffect{
game:delayedLogDamage(src, self, 0, ("%s(%d webs of fate)#LAST#"):format(DamageType:get(type).text_color or "#aaaaaa#", displace), false)
end
end
return {dam=dam}
end,
activate = function(self, eff)
......@@ -3096,7 +3103,16 @@ newEffect{
parameters = { procs=1 },
on_gain = function(self, err) return nil, "+Seal Fate" end,
on_lose = function(self, err) return nil, "-Seal Fate" end,
doDamage = function(self, eff, target)
callbackOnDealDamage = function(self, eff, dam, target)
if dam <=0 then return end
-- Spin Fate?
if self.turn_procs and not self.turn_procs.spin_seal then
self.turn_procs.spin_seal = true
self:callTalent(self.T_SPIN_FATE, "doSpin")
end
if self.turn_procs and target.tmp then
if self.turn_procs.seal_fate and self.turn_procs.seal_fate >= eff.procs then return end
local chance = 50
......
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