diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-12-10 22:02:04 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-12-10 22:02:04 +0000 |
commit | 12441b7619edbaa72b7e1eb403522d7ca4ce371d (patch) | |
tree | e521d6e089b11fda87003d789d1f6909a920a044 | |
parent | e1828c21282f3db7305f9e020f6fc933dad93383 (diff) | |
download | crawl-ref-12441b7619edbaa72b7e1eb403522d7ca4ce371d.tar.gz crawl-ref-12441b7619edbaa72b7e1eb403522d7ca4ce371d.zip |
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
-rw-r--r-- | crawl-ref/source/itemprop.cc | 15 |
1 files 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; |