summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/randart.cc
diff options
context:
space:
mode:
authorzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2007-12-11 07:04:48 +0000
committerzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2007-12-11 07:04:48 +0000
commitcdeeda046914bb54948d0c89e92988ff630f3ad7 (patch)
tree972aaf99c94405bcfe7cb045eb9751a154d5e7d6 /crawl-ref/source/randart.cc
parenta0bf507cfa086919b1797ca8d181d99e37abd14a (diff)
downloadcrawl-ref-cdeeda046914bb54948d0c89e92988ff630f3ad7.tar.gz
crawl-ref-cdeeda046914bb54948d0c89e92988ff630f3ad7.zip
The Ctrl-I wizard command can now generates stats on randart properties
for a given base item. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3046 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/randart.cc')
-rw-r--r--crawl-ref/source/randart.cc15
1 files changed, 10 insertions, 5 deletions
diff --git a/crawl-ref/source/randart.cc b/crawl-ref/source/randart.cc
index 5f7d849c86..870eddfc60 100644
--- a/crawl-ref/source/randart.cc
+++ b/crawl-ref/source/randart.cc
@@ -1190,7 +1190,7 @@ void randart_wpn_properties( const item_def &item,
proprt[RAP_BRAND] = SPWPN_NORMAL;
}
- // is this happens, things might get broken -- bwr
+ // if this happens, things might get broken -- bwr
if (proprt[RAP_BRAND] == SPWPN_SPEED && atype == WPN_QUICK_BLADE)
proprt[RAP_BRAND] = SPWPN_NORMAL;
@@ -2183,11 +2183,8 @@ static bool randart_is_conflicting( const item_def &item,
return false;
}
-static bool randart_is_bad( const item_def &item )
+bool randart_is_bad( const item_def &item, randart_properties_t &proprt )
{
- randart_properties_t proprt;
- randart_wpn_properties( item, proprt );
-
if (randart_wpn_num_props( proprt ) == 0)
return true;
@@ -2195,6 +2192,14 @@ static bool randart_is_bad( const item_def &item )
randart_is_conflicting( item, proprt ) );
}
+bool randart_is_bad( const item_def &item )
+{
+ randart_properties_t proprt;
+ randart_wpn_properties( item, proprt );
+
+ return randart_is_bad( item, proprt);
+}
+
bool make_item_randart( item_def &item )
{
if (item.base_type != OBJ_WEAPONS