Skip to content
Snippets Groups Projects
Commit 88717d71 authored by Chris Davidson's avatar Chris Davidson
Browse files

Limit GWF to once per turn and re-buff proc rate and duration numbers a bit

parent 3b143218
No related branches found
No related tags found
1 merge request!400Items misc
...@@ -1021,15 +1021,6 @@ function _M:attackTargetHitProcs(target, weapon, dam, apr, armor, damtype, mult, ...@@ -1021,15 +1021,6 @@ function _M:attackTargetHitProcs(target, weapon, dam, apr, armor, damtype, mult,
t.do_throw(target, self, t) t.do_throw(target, self, t)
end end
-- Greater Weapon Focus
local gwf = self:hasEffect(self.EFF_GREATER_WEAPON_FOCUS)
if hitted and not target.dead and weapon and gwf and not gwf.inside and rng.percent(gwf.chance) then
gwf.inside = true
game.logSeen(self, "%s focuses and gains an extra blow!", self.name:capitalize())
self:attackTargetWith(target, weapon, damtype, mult)
gwf.inside = nil
end
-- Zero gravity -- Zero gravity
if hitted and game.level.data.zero_gravity and rng.percent(util.bound(dam, 0, 100)) then if hitted and game.level.data.zero_gravity and rng.percent(util.bound(dam, 0, 100)) then
target:knockback(self.x, self.y, math.ceil(math.log(dam))) target:knockback(self.x, self.y, math.ceil(math.log(dam)))
......
...@@ -23,20 +23,20 @@ newTalent{ ...@@ -23,20 +23,20 @@ newTalent{
type = {"technique/battle-tactics", 1}, type = {"technique/battle-tactics", 1},
require = techs_req_high1, require = techs_req_high1,
points = 5, points = 5,
cooldown = 20, cooldown = 15,
stamina = 25, stamina = 25,
tactical = { ATTACK = 3 }, tactical = { ATTACK = 3 },
no_energy = true, no_energy = true,
getdur = function(self,t) return math.floor(self:combatTalentLimit(t, 8, 2, 6)) end, -- Limit to <10 getdur = function(self,t) return math.floor(self:combatTalentLimit(t, 10, 3, 8)) end, -- Limit to <10
getchance = function(self,t) return self:combatLimit(self:combatTalentStatDamage(t, "dex", 10, 60),100, 6.8, 6.8, 61, 61) end, -- Limit < 100% getchance = function(self,t) return self:combatLimit(self:combatTalentStatDamage(t, "dex", 10, 90),100, 6.8, 6.8, 61, 61) end, -- Limit < 100%
action = function(self, t) action = function(self, t)
self:setEffect(self.EFF_GREATER_WEAPON_FOCUS, t.getdur(self,t), {chance=t.getchance(self, t)}) self:setEffect(self.EFF_GREATER_WEAPON_FOCUS, t.getdur(self,t), {chance=t.getchance(self, t)})
return true return true
end, end,
info = function(self, t) info = function(self, t)
return ([[Concentrate on your blows; each strike has a %d%% chance to deal another, similar, blow for %d turns. return ([[Concentrate on your blows; for %d turns, each successful strike you land has a %d%% chance to trigger another, similar strike.
This works for all blows, even ones from other talents and from shield bashes. This works for all blows, even those from other talents and from shield bashes, but can happen only once each turn.
The chance increases with your Dexterity.]]):format(t.getchance(self, t), t.getdur(self, t)) The chance increases with your Dexterity.]]):format(t.getdur(self, t), t.getchance(self, t))
end, end,
} }
......
...@@ -1302,12 +1302,20 @@ newEffect{ ...@@ -1302,12 +1302,20 @@ newEffect{
newEffect{ newEffect{
name = "GREATER_WEAPON_FOCUS", image = "talents/greater_weapon_focus.png", name = "GREATER_WEAPON_FOCUS", image = "talents/greater_weapon_focus.png",
desc = "Greater Weapon Focus", desc = "Greater Weapon Focus",
long_desc = function(self, eff) return ("%d%% chance to score a secondary blow."):format(eff.chance) end, long_desc = function(self, eff) return ("Each melee blow landed has a %d%% chance to trigger an additional melee blow (up to once per turn)."):format(eff.chance) end,
type = "physical", type = "physical",
subtype = { tactic=true }, subtype = { tactic=true },
status = "beneficial", status = "beneficial",
parameters = { chance=50 }, parameters = { chance=25 },
-- trigger once per turn for targets
callbackOnMeleeAttack = function(self, eff, target, hitted, crit, weapon, damtype, mult, dam, hd)
if hitted and weapon and not self.turn_procs._gwf and not target.dead and rng.percent(eff.chance) then
self.turn_procs._gwf = true
self:attackTargetWith(target, weapon, damtype, mult)
end
end,
activate = function(self, eff) activate = function(self, eff)
eff.src = self
end, end,
deactivate = function(self, eff) deactivate = function(self, eff)
end, 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