summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/itemprop.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-01-22 06:05:50 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-01-22 06:05:50 +0000
commit2cbbec1b2a1acbed4db00a41a900e58cd0fbec9d (patch)
treede39b9836e48b8f4a5e79d05c669ffa881a6c894 /crawl-ref/source/itemprop.cc
parenta1f59ee435343a6dd58fff2bf161a5470870135f (diff)
downloadcrawl-ref-2cbbec1b2a1acbed4db00a41a900e58cd0fbec9d.tar.gz
crawl-ref-2cbbec1b2a1acbed4db00a41a900e58cd0fbec9d.zip
Various cleanups:
1. Move the blessed eudemon blade down in the weapon_type enum so that it's with the other blessed weapons, add a WPN_MAX_NONBLESSED parameter to indicate where the non-blessed weapons end, and make weapon mimics use it. Mimics can now no longer imitate blessed weapons, which makes them less of a giveaway, since only the blessed eudemon blade shows up normally, and it's normally colored yellow, neither of which are true for mimic versions. 2. Since all non-racial armors are in one contiguous block at the end of the armour_type enum, and since very little code depends on the armors' being in a particular order, add an ARM_MAX_RACIAL parameter to indicate where the potentially racial weapons end, and make set_equip_race() use it. Also, rearrange the armors a bit in the enum. 3. Since no code depends on the missiles' being in a particular order, move the non-racial missiles down to the end of the missile_type enum, add a MI_MAX_RACIAL parameter to indicate where the potentially racial missiles end, and make set_equip_race() use it. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8681 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/itemprop.cc')
-rw-r--r--crawl-ref/source/itemprop.cc15
1 files changed, 2 insertions, 13 deletions
diff --git a/crawl-ref/source/itemprop.cc b/crawl-ref/source/itemprop.cc
index 58b01629f0..011e8b06c3 100644
--- a/crawl-ref/source/itemprop.cc
+++ b/crawl-ref/source/itemprop.cc
@@ -697,24 +697,13 @@ void set_equip_race( item_def &item, unsigned long flags )
break;
case OBJ_ARMOUR:
- // not hides, dragon armour, crystal plate, or barding
- if ((item.sub_type >= ARM_DRAGON_HIDE
- && item.sub_type <= ARM_SWAMP_DRAGON_ARMOUR)
- || item.sub_type == ARM_CENTAUR_BARDING
- || item.sub_type == ARM_NAGA_BARDING)
- {
+ if (item.sub_type > ARM_MAX_RACIAL)
return;
- }
break;
case OBJ_MISSILES:
- if (item.sub_type == MI_STONE
- || item.sub_type == MI_LARGE_ROCK
- || item.sub_type == MI_SLING_BULLET
- || item.sub_type == MI_THROWING_NET)
- {
+ if (item.sub_type > MI_MAX_RACIAL)
return;
- }
break;
default: