summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/itemprop.cc
diff options
context:
space:
mode:
authorJohanna Ploog <j-p-e-g@users.sourceforge.net>2009-12-15 15:26:51 +0100
committerJohanna Ploog <j-p-e-g@users.sourceforge.net>2009-12-15 15:32:27 +0100
commit078604b473703ce2e8fc7af45d97cf8509c38a51 (patch)
tree81310916b8d253e63b8cf4c7ca85f9cdc94e3bd1 /crawl-ref/source/itemprop.cc
parent28cd903a83720fa6c967b316370fca975356cd86 (diff)
downloadcrawl-ref-078604b473703ce2e8fc7af45d97cf8509c38a51.tar.gz
crawl-ref-078604b473703ce2e8fc7af45d97cf8509c38a51.zip
Allow artefact armours to use "brands", i.e. egos.
Diffstat (limited to 'crawl-ref/source/itemprop.cc')
-rw-r--r--crawl-ref/source/itemprop.cc11
1 files changed, 8 insertions, 3 deletions
diff --git a/crawl-ref/source/itemprop.cc b/crawl-ref/source/itemprop.cc
index 9a9bf3e022..720dfff844 100644
--- a/crawl-ref/source/itemprop.cc
+++ b/crawl-ref/source/itemprop.cc
@@ -946,11 +946,16 @@ int get_ammo_brand( const item_def &item )
special_armour_type get_armour_ego_type( const item_def &item )
{
- // Artefact armours have no ego type, must look up powers
- // separately.
- if (item.base_type != OBJ_ARMOUR || is_artefact( item ))
+ // Armour ego types are "brands", so we do the randart lookup here.
+ if (item.base_type != OBJ_ARMOUR)
return (SPARM_NORMAL);
+ if (is_artefact( item ))
+ {
+ return (static_cast<special_armour_type>(
+ artefact_wpn_property( item, ARTP_BRAND )));
+ }
+
return (static_cast<special_armour_type>(item.special));
}