diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-12-13 04:46:53 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-12-13 04:46:53 +0000 |
commit | aaf761f5ca11f75a1447e3978aeb5e2c6bc562e2 (patch) | |
tree | 09b419f6b9ac820df2628094ec86962644645a2f /crawl-ref/source/itemprop.cc | |
parent | 7abec6bdf8be434d2635fb6a32278488e6925064 (diff) | |
download | crawl-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/itemprop.cc')
-rw-r--r-- | crawl-ref/source/itemprop.cc | 11 |
1 files changed, 9 insertions, 2 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; |