Skip to content
Snippets Groups Projects
Commit e68efd61 authored by Hachem_Muche's avatar Hachem_Muche
Browse files

Fixed error in parry talent descriptions.

Fixed Fan of Knives allocating too many knives to some targets.
bladestorm is unmovable.
parent 0cdc6dac
No related branches found
No related tags found
1 merge request!358Major update to Traps and further update for Rogue rework
...@@ -427,6 +427,7 @@ summon_bladestorm = function(self, target, duration, x, y, scale ) ...@@ -427,6 +427,7 @@ summon_bladestorm = function(self, target, duration, x, y, scale )
life_rating = 12, life_rating = 12,
never_move = 1, never_move = 1,
cant_be_moved = 1,
negative_status_effect_immune = 1, negative_status_effect_immune = 1,
combat_armor = math.floor(self.level*.75 + 10), combat_def = self.level * 2, combat_armor = math.floor(self.level*.75 + 10), combat_def = self.level * 2,
......
...@@ -73,7 +73,7 @@ newTalent{ -- Note: classes: Temporal Warden, Rogue, Shadowblade, Marauder ...@@ -73,7 +73,7 @@ newTalent{ -- Note: classes: Temporal Warden, Rogue, Shadowblade, Marauder
return ([[You have learned to block incoming blows with your offhand weapon. return ([[You have learned to block incoming blows with your offhand weapon.
When dual wielding, your defense is increased by %d. When dual wielding, your defense is increased by %d.
Up to %0.1f times a turn, you have a %d%% chance to parry up to %d damage (%d%% of your offhand weapon damage) from a melee attack. Up to %0.1f times a turn, you have a %d%% chance to parry up to %d damage (%d%% of your offhand weapon damage) from a melee attack.
A successful parry reduces damage like armour (before any attack multipliers) and prevents critical strikes. Partial parries have a proportionally reduced chance to succeed. You cannot parry attacks from an unseen attacker or with a mindstar. A successful parry reduces damage like armour (before any attack multipliers) and prevents critical strikes. Partial parries have a proportionally reduced chance to succeed. It is difficult to parry attacks from unseen attackers and you cannot parry with a mindstar.
The defense and chance to parry improve with Dexterity. The number of parries increases with Cunning.]]):format(t.getDefense(self, t), t.getDeflects(self, t, true), t.getDeflectChance(self,t), t.getDamageChange(self, t, true), t.getDeflectPercent(self,t)) The defense and chance to parry improve with Dexterity. The number of parries increases with Cunning.]]):format(t.getDefense(self, t), t.getDeflects(self, t, true), t.getDeflectChance(self,t), t.getDamageChange(self, t, true), t.getDeflectPercent(self,t))
end, end,
} }
......
...@@ -59,7 +59,7 @@ newTalent{ ...@@ -59,7 +59,7 @@ newTalent{
chance = t.getDeflectChance(self,t) chance = t.getDeflectChance(self,t)
perc = t.getDeflectPercent(self,t) perc = t.getDeflectPercent(self,t)
return ([[Up to %d times a turn, you have a %d%% chance to parry up to %d damage (%d%% of your offhand weapon damage) from a melee or ranged attack. return ([[Up to %d times a turn, you have a %d%% chance to parry up to %d damage (%d%% of your offhand weapon damage) from a melee or ranged attack.
A successful parry reduces damage like armour (before any attack multipliers) and prevents critical strikes. You cannot parry attacks from an unseen attacker or with a mindstar. A successful parry reduces damage like armour (before any attack multipliers) and prevents critical strikes. It is difficult to parry attacks from unseen attackers and you cannot parry with a mindstar.
The number of attacks you can parry and their chance partially stacks with those of Dual Weapon Defense.]]): The number of attacks you can parry and their chance partially stacks with those of Dual Weapon Defense.]]):
format(t.getDeflects(self, t, true), chance, block, perc) format(t.getDeflects(self, t, true), chance, block, perc)
end, end,
......
...@@ -224,33 +224,29 @@ newTalent{ ...@@ -224,33 +224,29 @@ newTalent{
local tg = self:getTalentTarget(t) local tg = self:getTalentTarget(t)
local x, y = self:getTarget(tg) local x, y = self:getTarget(tg)
if not x or not y then return end if not x or not y then return end
local count = t.getNb(self,t) local count = t.getNb(self,t)
local reload = self:callTalent(self.T_THROWING_KNIVES, "getReload")
local max = self:callTalent(self.T_THROWING_KNIVES, "getNb")
local tg2 = {type="bolt", range=tg.radius}
local tgts = {} local tgts = {}
grids = self:project(tg, x, y, function(px, py) self:project(tg, x, y, function(px, py)
local target = game.level.map(px, py, engine.Map.ACTOR) local target = game.level.map(px, py, engine.Map.ACTOR)
if not target then return end if not target then return end
tgts[#tgts+1] = target tgts[#tgts+1] = {act=target, cnt=0}
end) end)
local tgt_cnt = #tgts
table.shuffle(tgts) if tgt_cnt > 0 then
local tgt_max = math.min(3, math.ceil(count/tgt_cnt))
while count > 0 and #tgts > 0 do while count > 0 and #tgts > 0 do
for i = 1, math.min(count, #tgts) do local tgt, id = rng.table(tgts)
if #tgts <= 0 then break end if tgt then
local a, id = tgts[i] local proj = throw(self, self:getTalentRadius(t), t.getDamage(self,t), tgt.act.x, tgt.act.y, nil, nil, 1)
if a then
local proj = throw(self, self:getTalentRadius(t), t.getDamage(self,t), a.x, a.y, nil, nil, 1)
proj.name = "Fan of Knives" proj.name = "Fan of Knives"
tgt.cnt = tgt.cnt + 1
print(("Fan of Knives #%d: target:%s (%s, %s) = %d"):format(count, tgt.act.name, tgt.act.x, tgt.act.y, tgt.cnt))
count = count - 1 count = count - 1
a.turn_procs.fan_of_knives = 1 + (a.turn_procs.fan_of_knives or 0) if tgt.cnt >= tgt_max then table.remove(tgts, id) end
if a.turn_procs.fan_of_knives==3 then table.remove(tgts, id) end
end end
end end
print(count, "knives untargeted.")
end end
return true return true
......
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