summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/makeitem.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-24 07:29:40 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-24 07:29:40 +0000
commit7b6e06e7dfb876a56c99e2216a6071e0a652caf9 (patch)
tree6126035ebe8c10f89ec930992bfa2e0e99c7dc17 /crawl-ref/source/makeitem.cc
parenta9c18d8a40084b269f6173ba68283c3a2feaff48 (diff)
downloadcrawl-ref-7b6e06e7dfb876a56c99e2216a6071e0a652caf9.tar.gz
crawl-ref-7b6e06e7dfb876a56c99e2216a6071e0a652caf9.zip
Apply r6627, r6635, r6638 and r6645 (among others) to 0.4.
Fixes Selective Amnesia crash, claws/ankus in the weapon option, randart bardings pretending to be boots and smaller stuff. Includes indication of monsters seeing/sensing invisible. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@6665 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/makeitem.cc')
-rw-r--r--crawl-ref/source/makeitem.cc15
1 files changed, 10 insertions, 5 deletions
diff --git a/crawl-ref/source/makeitem.cc b/crawl-ref/source/makeitem.cc
index 1c5773419e..07da7fbef3 100644
--- a/crawl-ref/source/makeitem.cc
+++ b/crawl-ref/source/makeitem.cc
@@ -1829,13 +1829,18 @@ static bool _try_make_armour_artefact(item_def& item, int force_type,
// The other 98% are normal randarts.
- // No randart hides.
- hide2armour(item);
- make_item_randart( item );
-
// 10% of boots become barding.
if (item.sub_type == ARM_BOOTS && one_chance_in(10))
- item.sub_type = coinflip() ? ARM_NAGA_BARDING : ARM_CENTAUR_BARDING;
+ {
+ item.sub_type = coinflip() ? ARM_NAGA_BARDING
+ : ARM_CENTAUR_BARDING;
+ }
+ else
+ hide2armour(item); // No randart hides.
+
+ // Needs to be done after the barding chance else we get randart
+ // bardings named Boots of xy.
+ make_item_randart( item );
// Determine enchantment and cursedness.
if (one_chance_in(5))