From 2cbbec1b2a1acbed4db00a41a900e58cd0fbec9d Mon Sep 17 00:00:00 2001 From: dolorous Date: Thu, 22 Jan 2009 06:05:50 +0000 Subject: 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 --- crawl-ref/source/itemprop.cc | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'crawl-ref/source/itemprop.cc') 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: -- cgit v1.2.3-54-g00ecf