From 76b1efcae34c76b85794d93f9c787576f42ed225 Mon Sep 17 00:00:00 2001
From: dg <dg@51575b47-30f0-44d4-a5cc-537603b46e54>
Date: Tue, 1 May 2012 21:01:03 +0000
Subject: [PATCH] Pinning Shot limited to 5 turns at most

git-svn-id: http://svn.net-core.org/repos/t-engine4@5073 51575b47-30f0-44d4-a5cc-537603b46e54
---
 game/modules/tome/data/talents/techniques/archery.lua | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/game/modules/tome/data/talents/techniques/archery.lua b/game/modules/tome/data/talents/techniques/archery.lua
index c2a06c8850..5555bc9b41 100644
--- a/game/modules/tome/data/talents/techniques/archery.lua
+++ b/game/modules/tome/data/talents/techniques/archery.lua
@@ -310,10 +310,11 @@ newTalent{
 	range = archery_range,
 	tactical = { ATTACK = { weapon = 1 }, DISABLE = { pin = 2 } },
 	requires_target = true,
+	getDur = function(self, t) return ({2, 3, 4, 4, 5})[util.bound(self:getTalentLevelRaw(t), 1, 5)] end,
 	on_pre_use = function(self, t, silent) if not self:hasArcheryWeapon() then if not silent then game.logPlayer(self, "You require a bow or sling for this talent.") end return false end return true end,
 	archery_onhit = function(self, t, target, x, y)
 		if target:canBe("pin") then
-			target:setEffect(target.EFF_PINNED, 2 + self:getTalentLevelRaw(t), {apply_power=self:combatAttack()})
+			target:setEffect(target.EFF_PINNED, t.getDur(self, t), {apply_power=self:combatAttack()})
 		else
 			game.logSeen(target, "%s resists!", target.name:capitalize())
 		end
@@ -328,7 +329,7 @@ newTalent{
 		return ([[You fire a pinning shot, doing %d%% damage and pinning your target to the ground for %d turns.
 		Pinning chance increase with your Dexterity stat.]])
 		:format(self:combatTalentWeaponDamage(t, 1, 1.4) * 100,
-		2 + self:getTalentLevelRaw(t))
+		t.getDur(self, t))
 	end,
 }
 
-- 
GitLab