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

redid blended threads

parent 3f60acb1
No related branches found
No related tags found
1 merge request!182Chrono tweaks
......@@ -231,6 +231,16 @@ setDefaultProjector(function(src, x, y, type, dam, state)
game:delayedLogMessage(source, target, "dark_strike"..(source.uid or ""), "#Source# strikes #Target# in the darkness (%+d%%%%%%%% damage).", dark.damageIncrease) -- resolve %% 3 levels deep
end
end
-- blended threads, increase damage to distant targets
if src and src.hasEffect then
local eff = src:hasEffect(src.EFF_BLENDED_THREADS_BLADE)
if eff and target.x and core.fov.distance(src.x, src.y, target.x, target.y) > 2 then
inc = inc + eff.blade
print("[PROJECTOR] after blended threads increase dam", dam + (dam * inc) / 100)
end
end
dam = dam + (dam * inc / 100)
......
......@@ -129,11 +129,23 @@ newTalent{
require = chrono_req_high2,
mode = "passive",
points = 5,
getPercent = function(self, t) return self:combatTalentScale(t, 10, 50)/100 end,
getPercent = function(self, t) return self:combatTalentLimit(t, 50, 10, 30) end, -- Limit < 50% damage reduction
callbackOnArcheryAttack = function(self, t, target, hitted)
if hitted then
self:setEffect(self.EFF_BLENDED_THREADS_BOW, 2, {bow=t.getPercent(self, t)})
end
end,
callbackOnMeleeAttack = function(self, t, target, hitted)
if hitted then
self:setEffect(self.EFF_BLENDED_THREADS_BLADE, 2, {blade=t.getPercent(self, t)})
end
end,
info = function(self, t)
local percent = t.getPercent(self, t) * 100
return ([[Your Bow Threading and Blade Threading attacks now deal %d%% more weapon damage if you did not have the appropriate weapon equipped when you initiated the attack.]])
:format(percent)
local percent = t.getPercent(self, t)
return ([[When you hit with an arrow you reduce the damage you recieve from targets within two tiles of you by %d%%.
When you hit with your melee weapons you increase the damage you deal to targets more than two tiles away from you by %d%%.
Both of these effects may be active at once and last for two turns.]])
:format(percent, percent)
end
}
......
......@@ -3563,4 +3563,46 @@ newEffect{
end,
deactivate = function(self, eff)
end,
}
newEffect{
name = "BLENDED_THREADS_BOW", image = "talents/blended_threads.png",
desc = "Blended Threads",
long_desc = function(self, eff) return ("The target is reducing damage from nearby targets by %d%%."):format(eff.bow) end,
type = "magical",
subtype = { tactic=true },
status = "beneficial",
on_gain = function(self, err) return nil, "+Blended Threads" end,
on_lose = function(self, err) return nil, "-Blended Threads" end,
parameters = {bow=0},
callbackOnTakeDamage = function(self, eff, src, x, y, type, dam, tmp)
if src and src.x and src.y and dam > 0 then
-- assume instantaneous projection and check range to source
if core.fov.distance(self.x, self.y, src.x, src.y) <= 2 then
dam = dam * (100 - eff.bow) / 100
print("[PROJECTOR] Blended Threads (source) dam", dam)
end
end
return {dam=dam}
end,
activate = function(self, eff)
end,
deactivate = function(self, eff)
end,
}
newEffect{
name = "BLENDED_THREADS_BLADE", image = "talents/blended_threads.png",
desc = "Blended Threads",
long_desc = function(self, eff) return ("The target is dealing %d%% more damage to distant targets."):format(eff.blade) end,
type = "magical",
subtype = { tactic=true },
status = "beneficial",
on_gain = function(self, err) return nil, "+Blended Threads" end,
on_lose = function(self, err) return nil, "-Blended Threads" end,
parameters = {blade=0},
activate = function(self, eff)
end,
deactivate = function(self, eff)
end,
}
\ No newline at end of file
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