diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-11-11 16:29:05 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-11-11 16:29:05 +0000 |
commit | 53a915ae2eef1b5c39147e2ccaf6695b2e995898 (patch) | |
tree | b1f1005a30b0e161427a5f8ec802a0fa57e0d74a /crawl-ref/source/randart.cc | |
parent | 0bca2a20b6a35b2f3be34fab88902866ae7c38c6 (diff) | |
download | crawl-ref-53a915ae2eef1b5c39147e2ccaf6695b2e995898.tar.gz crawl-ref-53a915ae2eef1b5c39147e2ccaf6695b2e995898.zip |
Implementing FR 1829063: warning when putting on/removing items
with a stat property that will be fatal.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2839 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/randart.cc')
-rw-r--r-- | crawl-ref/source/randart.cc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/crawl-ref/source/randart.cc b/crawl-ref/source/randart.cc index 9559069127..10b7e81e06 100644 --- a/crawl-ref/source/randart.cc +++ b/crawl-ref/source/randart.cc @@ -1523,6 +1523,20 @@ int randart_wpn_property( const item_def &item, randart_prop_type prop ) return randart_wpn_property( item, prop, known ); } +int randart_known_wpn_property( const item_def &item, randart_prop_type prop ) +{ + randart_properties_t proprt; + randart_known_props_t known; + + randart_wpn_properties( item, proprt, known ); + + if (known[prop]) + return ( proprt[prop] ); + else + return (0); +} + + int randart_wpn_num_props( const item_def &item ) { randart_properties_t proprt; |