From 078604b473703ce2e8fc7af45d97cf8509c38a51 Mon Sep 17 00:00:00 2001 From: Johanna Ploog Date: Tue, 15 Dec 2009 15:26:51 +0100 Subject: Allow artefact armours to use "brands", i.e. egos. --- crawl-ref/source/itemprop.cc | 11 ++++++++--- 1 file 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( + artefact_wpn_property( item, ARTP_BRAND ))); + } + return (static_cast(item.special)); } -- cgit v1.2.3-54-g00ecf