From 6ffb3b2ebe74f125265abce7cf0bffd851996729 Mon Sep 17 00:00:00 2001 From: dolorous Date: Sat, 14 Feb 2009 18:57:58 +0000 Subject: For completeness, add a mundanity check for armor items. Note that, since no armors are considered mundane, it currently has no effect. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9073 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/makeitem.cc | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'crawl-ref/source/makeitem.cc') diff --git a/crawl-ref/source/makeitem.cc b/crawl-ref/source/makeitem.cc index cba2bf2f95..5e85d5c141 100644 --- a/crawl-ref/source/makeitem.cc +++ b/crawl-ref/source/makeitem.cc @@ -2122,8 +2122,9 @@ static void _generate_armour_item(item_def& item, bool allow_uniques, if (item_level == -5) do_curse_item(item); } - else if (force_good || forced_ego || item.sub_type == ARM_WIZARD_HAT - || x_chance_in_y(51 + item_level, 250)) + else if ((force_good || forced_ego || item.sub_type == ARM_WIZARD_HAT + || x_chance_in_y(51 + item_level, 250)) + && !_item_is_mundane(item)) { // Make a good item... item.plus += random2(3); @@ -4494,16 +4495,15 @@ void item_set_appearance(item_def &item) break; case OBJ_ARMOUR: - // if not given a racial type, and special, give shiny/runed/etc desc. - if (get_armour_ego_type( item ) != SPARM_NORMAL + // If not given a racial type, and special, make shiny/runed/etc. + if (get_armour_ego_type(item) != SPARM_NORMAL || item.plus != 0 && !one_chance_in(3)) { - const item_status_flag_type descs[] = - { - ISFLAG_GLOWING, ISFLAG_RUNED, ISFLAG_EMBROIDERED_SHINY - }; + const item_status_flag_type descs[] = { ISFLAG_GLOWING, + ISFLAG_RUNED, + ISFLAG_EMBROIDERED_SHINY }; - set_equip_desc( item, RANDOM_ELEMENT(descs) ); + set_equip_desc(item, RANDOM_ELEMENT(descs)); } break; -- cgit v1.2.3-54-g00ecf