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

Shattering Impact can only trigger once per turn

git-svn-id: http://svn.net-core.org/repos/t-engine4@3213 51575b47-30f0-44d4-a5cc-537603b46e54
parent 5e9282fd
No related branches found
No related tags found
No related merge requests found
...@@ -322,10 +322,12 @@ function _M:attackTargetWith(target, weapon, damtype, mult) ...@@ -322,10 +322,12 @@ function _M:attackTargetWith(target, weapon, damtype, mult)
end end
-- Shattering Impact -- Shattering Impact
if hitted and self:attr("shattering_impact") then if hitted and self:attr("shattering_impact") and (not self.shattering_impact_last_turn or self.shattering_impact_last_turn < game.turn) then
local dam = dam * self.shattering_impact local dam = dam * self.shattering_impact
self:project({type="ball", radius=1, selffire=false}, target.x, target.y, DamageType.PHYSICAL, dam) self:project({type="ball", radius=1, selffire=false}, target.x, target.y, DamageType.PHYSICAL, dam)
self:incStamina(-15) self:incStamina(-15)
self.shattering_impact_last_turn = game.turn
print"===========IMPACT"
end end
-- Onslaught -- Onslaught
...@@ -428,7 +430,7 @@ function _M:attackTargetWith(target, weapon, damtype, mult) ...@@ -428,7 +430,7 @@ function _M:attackTargetWith(target, weapon, damtype, mult)
local damage = t.getDamage(target, t) local damage = t.getDamage(target, t)
local hit = target:attackTarget(self, nil, damage, true) local hit = target:attackTarget(self, nil, damage, true)
end end
-- Defensive Throw! -- Defensive Throw!
if not hitted and not target.dead and not evaded and not target:attr("stunned") and not target:attr("dazed") and not target:attr("stoned") and target:knowTalent(target.T_DEFENSIVE_THROW) and rng.percent(target:getTalentLevel(target.T_DEFENSIVE_THROW) * (5 + target:getCun(5))) then if not hitted and not target.dead and not evaded and not target:attr("stunned") and not target:attr("dazed") and not target:attr("stoned") and target:knowTalent(target.T_DEFENSIVE_THROW) and rng.percent(target:getTalentLevel(target.T_DEFENSIVE_THROW) * (5 + target:getCun(5))) then
local t = target:getTalentFromId(target.T_DEFENSIVE_THROW) local t = target:getTalentFromId(target.T_DEFENSIVE_THROW)
......
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