diff --git a/src/res/e2k9.xml b/src/res/e2k9.xml
index 37b119d8e..a0cd1dd08 100644
--- a/src/res/e2k9.xml
+++ b/src/res/e2k9.xml
@@ -82,7 +82,6 @@
-
@@ -101,6 +100,7 @@
+
diff --git a/src/res/e2k9/races.xml b/src/res/e2k9/races.xml
index c7cb5906c..3a6975d76 100644
--- a/src/res/e2k9/races.xml
+++ b/src/res/e2k9/races.xml
@@ -37,7 +37,6 @@
-
@@ -60,7 +59,6 @@
-
@@ -83,7 +81,6 @@
-
@@ -91,7 +88,6 @@
-
@@ -107,7 +103,6 @@
-
@@ -132,7 +127,6 @@
-
@@ -154,7 +148,6 @@
-
@@ -178,7 +171,6 @@
-
@@ -187,6 +179,7 @@
+
@@ -206,7 +199,6 @@
-
@@ -234,7 +226,6 @@
-
@@ -257,8 +248,7 @@
-
-
+
@@ -280,8 +270,7 @@
-
-
+
@@ -305,8 +294,7 @@
-
-
+
@@ -330,8 +318,7 @@
-
-
+
@@ -358,8 +345,7 @@
-
-
+
@@ -383,8 +369,7 @@
-
-
+
@@ -406,8 +391,7 @@
-
-
+
@@ -432,8 +416,7 @@
-
-
+
@@ -460,8 +443,7 @@
-
-
+
@@ -485,8 +467,7 @@
-
-
+
@@ -509,7 +490,6 @@
-
@@ -534,8 +514,7 @@
-
-
+
@@ -563,8 +542,7 @@
-
-
+
@@ -588,8 +566,7 @@
-
-
+
@@ -612,8 +589,7 @@
-
-
+
@@ -638,7 +614,6 @@
-
@@ -678,7 +653,6 @@
-
@@ -703,7 +677,6 @@
-
@@ -841,8 +814,7 @@
-
-
+
diff --git a/src/scripts/e2k9/items.lua b/src/scripts/e2k9/items.lua
index 9d759841c..ee56d1a50 100644
--- a/src/scripts/e2k9/items.lua
+++ b/src/scripts/e2k9/items.lua
@@ -1,22 +1,27 @@
-- when appending to this, make sure the item has a canuse-function!
local goblin_denied = " plate lance mallornlance greatbow axe greatsword halberd rustyaxe rustyhalberd towershield "
function item_canuse(u, iname)
- if u.race=="goblin" then
+ local race = u.race
+ if race=="goblin" then
if string.find(goblin_denied, " " .. iname .. " ") then
return false
end
end
- if iname=="towershield" or iname=="rep_crossbow" then
+ if iname=="rep_crossbow" then
+ -- only dwarves and halflings allowed to use towershield
+ return race=="dwarf" or race=="halfling"
+ end
+ if iname=="towershield" then
-- only dwarves allowed to use towershield
- return u.race=="dwarf"
+ return race=="dwarf"
end
if iname=="greatbow" then
-- only elves use greatbow
- return u.race=="elf"
+ return race=="elf"
end
if iname=="plate" then
-- goblins cannot use plate
- return u.race~="goblin"
+ return race~="goblin"
end
return true
end