summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2007-12-13 04:46:53 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2007-12-13 04:46:53 +0000
commitaaf761f5ca11f75a1447e3978aeb5e2c6bc562e2 (patch)
tree09b419f6b9ac820df2628094ec86962644645a2f /crawl-ref/source
parent7abec6bdf8be434d2635fb6a32278488e6925064 (diff)
downloadcrawl-ref-aaf761f5ca11f75a1447e3978aeb5e2c6bc562e2.tar.gz
crawl-ref-aaf761f5ca11f75a1447e3978aeb5e2c6bc562e2.zip
In set_equip_race(), disallow elven crossbows, dwarven bows and hand
crossbows, and orcish hand crossbows. Do this since elves don't make bolts, dwarves don't make arrows, and dwarves and orcs only make crossbows. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3051 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source')
-rw-r--r--crawl-ref/source/itemprop.cc11
-rw-r--r--crawl-ref/source/makeitem.cc8
2 files changed, 13 insertions, 6 deletions
diff --git a/crawl-ref/source/itemprop.cc b/crawl-ref/source/itemprop.cc
index 0cb5aa643e..d203925a09 100644
--- a/crawl-ref/source/itemprop.cc
+++ b/crawl-ref/source/itemprop.cc
@@ -677,7 +677,8 @@ void set_equip_race( item_def &item, unsigned long flags )
{
case OBJ_WEAPONS:
if (weapon_skill(item) == SK_MACES_FLAILS
- || weapon_skill(item) == SK_AXES)
+ || weapon_skill(item) == SK_AXES
+ || item.sub_type == WPN_CROSSBOW)
{
return;
}
@@ -705,7 +706,9 @@ void set_equip_race( item_def &item, unsigned long flags )
{
case OBJ_WEAPONS:
if (weapon_skill(item) == SK_POLEARMS
- || item.sub_type == WPN_BLOWGUN)
+ || item.sub_type == WPN_BLOWGUN
+ || item.sub_type == WPN_BOW
+ || item.sub_type == WPN_HAND_CROSSBOW)
{
return;
}
@@ -735,6 +738,10 @@ void set_equip_race( item_def &item, unsigned long flags )
case ISFLAG_ORCISH:
switch (item.base_type)
{
+ case OBJ_WEAPONS:
+ if (item.sub_type == WPN_HAND_CROSSBOW)
+ return;
+ break;
case OBJ_ARMOUR:
if (get_armour_slot(item) == EQ_HELMET && !is_hard_helmet(item))
return;
diff --git a/crawl-ref/source/makeitem.cc b/crawl-ref/source/makeitem.cc
index 71a58f3f00..899ae153aa 100644
--- a/crawl-ref/source/makeitem.cc
+++ b/crawl-ref/source/makeitem.cc
@@ -1127,11 +1127,11 @@ static void weapon_add_racial_modifiers(item_def& item)
if (coinflip())
item.plus2++;
break;
-
+
case ISFLAG_ELVEN:
item.plus += random2(3);
break;
-
+
case ISFLAG_DWARVEN:
if (coinflip())
item.plus++;
@@ -1513,8 +1513,8 @@ static void generate_weapon_item(item_def& item, bool allow_uniques,
set_equip_race(item, determine_weapon_race(item, item_race));
- // if we allow acquirement-type items to be orcish, then
- // there's a good chance that we'll just strip them of
+ // if we allow acquirement-type items to be orcish, then
+ // there's a good chance that we'll just strip them of
// their ego type at the bottom of this function. -- bwr
if (force_good && get_equip_race( item ) == ISFLAG_ORCISH)
set_equip_race( item, ISFLAG_NO_RACE );