From 2d60976caffd91ac50c3b921bc7b77e63611cd34 Mon Sep 17 00:00:00 2001
From: dg <dg@51575b47-30f0-44d4-a5cc-537603b46e54>
Date: Fri, 23 Sep 2011 08:49:59 +0000
Subject: [PATCH] Bows & Slings are only equipable for people with the Shoot
 talent

git-svn-id: http://svn.net-core.org/repos/t-engine4@4447 51575b47-30f0-44d4-a5cc-537603b46e54
---
 game/modules/tome/data/general/objects/bows.lua   | 3 +++
 game/modules/tome/data/general/objects/slings.lua | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/game/modules/tome/data/general/objects/bows.lua b/game/modules/tome/data/general/objects/bows.lua
index 069d50babe..97df611aef 100644
--- a/game/modules/tome/data/general/objects/bows.lua
+++ b/game/modules/tome/data/general/objects/bows.lua
@@ -17,6 +17,8 @@
 -- Nicolas Casalini "DarkGod"
 -- darkgod@te4.org
 
+local Talents = require "engine.interface.ActorTalents"
+
 newEntity{
 	define_as = "BASE_LONGBOW",
 	slot = "MAINHAND",
@@ -27,6 +29,7 @@ newEntity{
 	encumber = 4,
 	rarity = 5,
 	combat = { talented = "bow", sound = "actions/arrow", sound_miss = "actions/arrow",},
+	require = { talent = { Talents.T_SHOOT }, },
 	archery = "bow",
 	proj_image = resolvers.image_material("arrow", "wood"),
 	basic_ammo = { talented = "bow", damrange = 1.4  },
diff --git a/game/modules/tome/data/general/objects/slings.lua b/game/modules/tome/data/general/objects/slings.lua
index 87bafbe7f2..f5e5961e60 100644
--- a/game/modules/tome/data/general/objects/slings.lua
+++ b/game/modules/tome/data/general/objects/slings.lua
@@ -17,6 +17,8 @@
 -- Nicolas Casalini "DarkGod"
 -- darkgod@te4.org
 
+local Talents = require "engine.interface.ActorTalents"
+
 newEntity{
 	define_as = "BASE_SLING",
 	slot = "MAINHAND",
@@ -27,6 +29,7 @@ newEntity{
 	rarity = 5,
 	combat = { talented = "sling", sound = "actions/arrow", sound_miss = "actions/arrow", },
 	archery = "sling",
+	require = { talent = { Talents.T_SHOOT }, },
 	proj_image = resolvers.image_material("shot_s", "metal"),
 	basic_ammo = { talented = "sling", damrange = 1.2},
 	desc = [[Slings are used to hurl stones or metal shots at your foes.]],
-- 
GitLab