From 97825fc0842425c81eb54ac25c6f777bead60610 Mon Sep 17 00:00:00 2001
From: dg <dg@51575b47-30f0-44d4-a5cc-537603b46e54>
Date: Sat, 3 Apr 2010 22:43:24 +0000
Subject: [PATCH] do not damage for 0

git-svn-id: http://svn.net-core.org/repos/t-engine4@496 51575b47-30f0-44d4-a5cc-537603b46e54
---
 game/modules/tome/class/interface/Combat.lua | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/game/modules/tome/class/interface/Combat.lua b/game/modules/tome/class/interface/Combat.lua
index 8e9f2b51c9..ce7c0d0b28 100644
--- a/game/modules/tome/class/interface/Combat.lua
+++ b/game/modules/tome/class/interface/Combat.lua
@@ -265,12 +265,16 @@ function _M:attackTargetWith(target, weapon, damtype, mult)
 
 	-- Melee project
 	if hitted then for typ, dam in pairs(self.melee_project) do
-		DamageType:get(typ).projector(self, target.x, target.y, typ, dam)
+		if dam > 0 then
+			DamageType:get(typ).projector(self, target.x, target.y, typ, dam)
+		end
 	end end
 
 	-- Reactive target on hit damage
 	if hitted then for typ, dam in pairs(target.on_melee_hit) do
-		DamageType:get(typ).projector(target, self.x, self.y, typ, dam)
+		if dam > 0 then
+			DamageType:get(typ).projector(target, self.x, self.y, typ, dam)
+		end
 	end end
 
 	-- Riposte!
-- 
GitLab