diff options
Diffstat (limited to 'crawl-ref/source')
-rw-r--r-- | crawl-ref/source/art-data.txt | 3 | ||||
-rw-r--r-- | crawl-ref/source/shopping.cc | 7 |
2 files changed, 6 insertions, 4 deletions
diff --git a/crawl-ref/source/art-data.txt b/crawl-ref/source/art-data.txt index feab12a21e..7583b01c6d 100644 --- a/crawl-ref/source/art-data.txt +++ b/crawl-ref/source/art-data.txt @@ -149,7 +149,8 @@ # See Tiles section above. # TILE_EQ: The file containing the equipment tile for the player doll as # defined in rltiles/dc-player.txt. See Tiles section above. -# VALUE: Modifies the value returned by item_value() +# VALUE: item_value() will return this number instead of doing automatic +# calculations to determine the value. ################################################################## diff --git a/crawl-ref/source/shopping.cc b/crawl-ref/source/shopping.cc index 30d0907f3f..24ca43d0e9 100644 --- a/crawl-ref/source/shopping.cc +++ b/crawl-ref/source/shopping.cc @@ -616,15 +616,16 @@ unsigned int item_value( item_def item, bool ident ) // copy to mangle as necessary. item.flags = (ident) ? (item.flags | ISFLAG_IDENT_MASK) : (item.flags); - int valued = 0; - if (is_unrandom_artefact( item ) && item_ident( item, ISFLAG_KNOW_PROPERTIES )) { const unrandart_entry *entry = get_unrand_entry(item.special); - valued += entry->value; + if (entry->value != 0) + return (entry->value); } + int valued = 0; + switch (item.base_type) { case OBJ_WEAPONS: |