summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/makeitem.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2007-11-29 20:00:51 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2007-11-29 20:00:51 +0000
commitf6c4d4cc8ad1f3c297deb85397240117dcf731d4 (patch)
tree756b198600f3f666c90bf00f782b5aca4f699123 /crawl-ref/source/makeitem.cc
parentbdc780ed167c098605f620a74238aec4f84e0c58 (diff)
downloadcrawl-ref-f6c4d4cc8ad1f3c297deb85397240117dcf731d4.tar.gz
crawl-ref-f6c4d4cc8ad1f3c297deb85397240117dcf731d4.zip
Move the disabling of elven maces/flails and dwarven polearms into
set_equip_race(), so that it isn't duplicated for both players and monsters (both of which use this function). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2940 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/makeitem.cc')
-rw-r--r--crawl-ref/source/makeitem.cc17
1 files changed, 9 insertions, 8 deletions
diff --git a/crawl-ref/source/makeitem.cc b/crawl-ref/source/makeitem.cc
index 633db77418..61655edd07 100644
--- a/crawl-ref/source/makeitem.cc
+++ b/crawl-ref/source/makeitem.cc
@@ -970,13 +970,11 @@ static item_status_flag_type determine_weapon_race(const item_def& item,
switch (item_race)
{
case MAKE_ITEM_ELVEN:
- if (weapon_skill(item) != SK_MACES_FLAILS)
- rc = ISFLAG_ELVEN;
+ rc = ISFLAG_ELVEN;
break;
case MAKE_ITEM_DWARVEN:
- if (weapon_skill(item) != SK_POLEARMS)
- rc = ISFLAG_DWARVEN;
+ rc = ISFLAG_DWARVEN;
break;
case MAKE_ITEM_ORCISH:
@@ -1624,7 +1622,8 @@ static item_status_flag_type determine_missile_race(const item_def& item,
case MAKE_ITEM_RANDOM_RACE:
// Elves don't make bolts
- if ((item.sub_type == MI_ARROW || item.sub_type == MI_DART)
+ if ((item.sub_type == MI_ARROW
+ || item.sub_type == MI_DART)
&& one_chance_in(4))
{
rc = ISFLAG_ELVEN;
@@ -1638,14 +1637,16 @@ static item_status_flag_type determine_missile_race(const item_def& item,
{
rc = ISFLAG_ORCISH;
}
-
- // Dwarves don't make arrows (or needles, see below)
- if ((item.sub_type == MI_DART || item.sub_type == MI_BOLT)
+
+ // Dwarves don't make arrows
+ if ((item.sub_type == MI_DART
+ || item.sub_type == MI_BOLT)
&& one_chance_in(6))
{
rc = ISFLAG_DWARVEN;
}
+ // Dwarves don't make needles
if (item.sub_type == MI_NEEDLE)
{
if (one_chance_in(10))