1.1.3 Unarmed Discipline Tree not working

Where bugs go to lie down and rest

Moderator: Moderator

Post Reply
Message
Author
Nevuk
Thalore
Posts: 190
Joined: Thu Jul 27, 2006 2:50 am

1.1.3 Unarmed Discipline Tree not working

#1 Post by Nevuk »

Not sure what's going on here - push kick seems to have a 100% miss rate (it's never hit anything and I've tried on a variety of characters) and I'm fairly sure that the defensive throws never hit either (they would proc but always miss). I've never put enough points in to try out roundhouse kick but push kick being literally useless seems ... unintended and to point to deeper issues with the tree.

Hachem_Muche
Uruivellas
Posts: 744
Joined: Thu Nov 18, 2010 6:42 pm

Re: 1.1.3 Unarmed Discipline Tree not working

#2 Post by Hachem_Muche »

The evasion check for Pushkick is incorrectly being checked in reverse, causing it to miss for any target that does NOT evade you. Also, Defensive Throw and Counterattack are incorrectly not triggering if the target evades the attacker. Fix:

Code: Select all

 game/modules/tome/class/interface/Combat.lua                     | 4 ++--
 game/modules/tome/data/talents/techniques/unarmed-discipline.lua | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/game/modules/tome/class/interface/Combat.lua b/game/modules/tome/class/interface/Combat.lua
index 4ce7903..370068b 100644
--- a/game/modules/tome/class/interface/Combat.lua
+++ b/game/modules/tome/class/interface/Combat.lua
@@ -797,7 +797,7 @@ function _M:attackTargetWith(target, weapon, damtype, mult, force_dam)
 	end
 
 	-- Counter Attack!
-	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_COUNTER_ATTACK) and self:isNear(target.x,target.y, 1) then --Adjacency check
+	if not hitted and not target.dead and target:knowTalent(target.T_COUNTER_ATTACK) and not target:attr("stunned") and not target:attr("dazed") and not target:attr("stoned") and target:knowTalent(target.T_COUNTER_ATTACK) and self:isNear(target.x,target.y, 1) then --Adjacency check
 		local cadam = target:callTalent(target.T_COUNTER_ATTACK,"checkCounterAttack")
 		if cadam then
 			game.logSeen(self, "%s counters the attack!", target.name:capitalize())
@@ -812,7 +812,7 @@ function _M:attackTargetWith(target, weapon, damtype, mult, force_dam)
 	end
 
 	-- 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 target:isNear(self.x,self.y,1) then
+	if not hitted and not target.dead and target:knowTalent(target.T_DEFENSIVE_THROW) and not target:attr("stunned") and not target:attr("dazed") and not target:attr("stoned") and target:isNear(self.x,self.y,1) then
 		local t = target:getTalentFromId(target.T_DEFENSIVE_THROW)
 		t.do_throw(target, self, t)
 	end
diff --git a/game/modules/tome/data/talents/techniques/unarmed-discipline.lua b/game/modules/tome/data/talents/techniques/unarmed-discipline.lua
index 02c2fbf..49cf523 100644
--- a/game/modules/tome/data/talents/techniques/unarmed-discipline.lua
+++ b/game/modules/tome/data/talents/techniques/unarmed-discipline.lua
@@ -34,7 +34,7 @@ newTalent{
 		if not x or not y or not target then return nil end
 		if core.fov.distance(self.x, self.y, x, y) > 1 then return nil end
 
-		local hit = target:checkHit(self:combatAttack(), target:combatDefense(), 0, 95) and self:checkEvasion(target)
+		local hit = target:checkHit(self:combatAttack(), target:combatDefense(), 0, 95) and not self:checkEvasion(target)
 		-- Try to knockback !
 		if hit then
 			local can = function(target)
Author of the Infinite 500 and PlenumTooltip addons, and the joys of Scaling in ToME.

stinkstink
Spiderkin
Posts: 543
Joined: Sat Feb 11, 2012 1:12 am

Re: 1.1.3 Unarmed Discipline Tree not working

#3 Post by stinkstink »

Evaded is for when the target evades the attack specifically through the Evasion effect, I presume Counter Attack and Defensive Throw don't fire in that case as a balancing measure.

Hachem_Muche
Uruivellas
Posts: 744
Joined: Thu Nov 18, 2010 6:42 pm

Re: 1.1.3 Unarmed Discipline Tree not working

#4 Post by Hachem_Muche »

I wasn't aware of a balance problem with it. But if so, that part doesn't need to change.
Author of the Infinite 500 and PlenumTooltip addons, and the joys of Scaling in ToME.

Post Reply