summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/randart.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-04-16 15:20:16 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-04-16 15:20:16 +0000
commit173858bc3514e1de1c406400ff9b1f2261cea836 (patch)
tree91e0d124bdbed818dc377fd381e58f6b5545d58a /crawl-ref/source/randart.cc
parentbf6b4b21ccc66c8e458ee433add5741ec90e5d87 (diff)
downloadcrawl-ref-173858bc3514e1de1c406400ff9b1f2261cea836.tar.gz
crawl-ref-173858bc3514e1de1c406400ff9b1f2261cea836.zip
Long blades blessed by TSO now become artefact blessed blades (without
the randomized effects). There should probably be some restrictions on the randart name eventually, so you don't end up with e.g. "the +1 blessed blade of Atheism". git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4258 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/randart.cc')
-rw-r--r--crawl-ref/source/randart.cc12
1 files changed, 8 insertions, 4 deletions
diff --git a/crawl-ref/source/randart.cc b/crawl-ref/source/randart.cc
index 93aefc9ba6..635873953d 100644
--- a/crawl-ref/source/randart.cc
+++ b/crawl-ref/source/randart.cc
@@ -1643,7 +1643,7 @@ bool randart_is_bad( const item_def &item )
return randart_is_bad( item, proprt);
}
-bool make_item_randart( item_def &item )
+bool make_item_randart( item_def &item, bool randomise )
{
if (item.base_type != OBJ_WEAPONS
&& item.base_type != OBJ_ARMOUR
@@ -1666,10 +1666,14 @@ bool make_item_randart( item_def &item )
known[i] = (bool) false;
item.flags |= ISFLAG_RANDART;
- do
+
+ if (randomise)
{
- item.special = (random_int() & RANDART_SEED_MASK);
- } while (randart_is_bad( item ));
+ do
+ {
+ item.special = (random_int() & RANDART_SEED_MASK);
+ } while (randart_is_bad( item ));
+ }
return (true);
}