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

Disarm now requires a melee hit to work

git-svn-id: http://svn.net-core.org/repos/t-engine4@3536 51575b47-30f0-44d4-a5cc-537603b46e54
parent 8d77084f
No related branches found
No related tags found
No related merge requests found
......@@ -211,8 +211,7 @@ newTalent{
if math.floor(core.fov.distance(self.x, self.y, x, y)) > 1 then return nil end
local hit = self:attackTarget(target, nil, self:combatTalentWeaponDamage(t, 0.5, 1), true)
-- No check to see if the attack hit
if target:checkHit(self:combatAttackStr(), target:combatPhysicalResist(), 0, 95, 5 - self:getTalentLevel(t) / 2) and target:canBe("disarm") then
if hit and target:checkHit(self:combatAttackStr(), target:combatPhysicalResist(), 0, 95, 5 - self:getTalentLevel(t) / 2) and target:canBe("disarm") then
target:setEffect(target.EFF_DISARMED, 2 + self:getTalentLevel(t), {})
else
game.logSeen(target, "%s resists the blow!", target.name:capitalize())
......
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