From 12441b7619edbaa72b7e1eb403522d7ca4ce371d Mon Sep 17 00:00:00 2001 From: dolorous Date: Mon, 10 Dec 2007 22:02:04 +0000 Subject: Add one last consistency fix for equipment. Disallow elven hard helmets (helmets and helms), as well as dwarven and orcish soft helmets (caps and wizards' hats). Those are the only kinds randomly generated, and some wanderers can get them. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3039 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/itemprop.cc | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/crawl-ref/source/itemprop.cc b/crawl-ref/source/itemprop.cc index 840aed7a0c..42c4e92c62 100644 --- a/crawl-ref/source/itemprop.cc +++ b/crawl-ref/source/itemprop.cc @@ -683,7 +683,8 @@ void set_equip_race( item_def &item, unsigned long flags ) } break; case OBJ_ARMOUR: - if (item.sub_type == ARM_SPLINT_MAIL + if (is_hard_helmet(item) + || item.sub_type == ARM_SPLINT_MAIL || item.sub_type == ARM_BANDED_MAIL || item.sub_type == ARM_PLATE_MAIL) { @@ -710,7 +711,8 @@ void set_equip_race( item_def &item, unsigned long flags ) } break; case OBJ_ARMOUR: - if (item.sub_type == ARM_ROBE + if (!is_hard_helmet(item) + || item.sub_type == ARM_ROBE || item.sub_type == ARM_LEATHER_ARMOUR || item.sub_type == ARM_STUDDED_LEATHER_ARMOUR) { @@ -731,6 +733,15 @@ void set_equip_race( item_def &item, unsigned long flags ) break; case ISFLAG_ORCISH: + switch (item.base_type) + { + case OBJ_ARMOUR: + if (!is_hard_helmet(item)) + return; + break; + default: + break; + } default: break; -- cgit v1.2.3-54-g00ecf