diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-02-14 18:57:58 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-02-14 18:57:58 +0000 |
commit | 6ffb3b2ebe74f125265abce7cf0bffd851996729 (patch) | |
tree | a4abf16726dc32315999c2f1720004ba71c68f2a /crawl-ref/source/makeitem.cc | |
parent | 0e7c1bcaa495fc0eb5e8f2c6315a046238d7f264 (diff) | |
download | crawl-ref-6ffb3b2ebe74f125265abce7cf0bffd851996729.tar.gz crawl-ref-6ffb3b2ebe74f125265abce7cf0bffd851996729.zip |
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
Diffstat (limited to 'crawl-ref/source/makeitem.cc')
-rw-r--r-- | crawl-ref/source/makeitem.cc | 18 |
1 files changed, 9 insertions, 9 deletions
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; |