From cdeeda046914bb54948d0c89e92988ff630f3ad7 Mon Sep 17 00:00:00 2001 From: zelgadis Date: Tue, 11 Dec 2007 07:04:48 +0000 Subject: 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 --- crawl-ref/source/randart.cc | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'crawl-ref/source/randart.cc') 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 -- cgit v1.2.3-54-g00ecf