diff options
author | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-06-27 09:58:49 +0000 |
---|---|---|
committer | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-06-27 09:58:49 +0000 |
commit | 7aa3305f41d2f073710d9a732bd29572b704bc49 (patch) | |
tree | 374aa17118ecb68bc4c237176506dbaf9aafb0b7 /crawl-ref/source/shopping.cc | |
parent | 3cc681e30ac236f7b88adece29f194cb30138ec8 (diff) | |
download | crawl-ref-7aa3305f41d2f073710d9a732bd29572b704bc49.tar.gz crawl-ref-7aa3305f41d2f073710d9a732bd29572b704bc49.zip |
* Moved most hard-coded non-standard unrandart behaviour to art-func.h,
specifically code for equipping, unequpping, an equipped unrandart doing
something every time world_reacts() is called (special wield effects),
melee hit effects, and evoking. Left hardcoded outside of art-func.h:
* Sword of Cerebov temproarily downgrading the defender's fire
resistance.
* Staff of Olgreb boosting poison spells, as if it were a staff
of poison.
* Vampire's Tooth always getting maximal vampiric drain.
* Mace of Variablity's initial pluses being chosen at creation time.
* Since what used to be special wield effects is now handled very
differently, noisy weapons and the lantern of shadows effects
are handled with player attributes rather than SPWLD_NOISES and
SPWLD_SHADOW.
* Unrandarts can now have an elemental colour for their colour
(currently only used for the Mace of Variability).
* Unrandarts' value modification, being special, and being
evil are now handled in art-data.txt rather than being hardcoded.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10055 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/shopping.cc')
-rw-r--r-- | crawl-ref/source/shopping.cc | 53 |
1 files changed, 7 insertions, 46 deletions
diff --git a/crawl-ref/source/shopping.cc b/crawl-ref/source/shopping.cc index 48f4a8dd07..30d0907f3f 100644 --- a/crawl-ref/source/shopping.cc +++ b/crawl-ref/source/shopping.cc @@ -618,55 +618,16 @@ unsigned int item_value( item_def item, bool ident ) 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; + } + switch (item.base_type) { case OBJ_WEAPONS: - if (is_unrandom_artefact( item )) - { - if (item_ident( item, ISFLAG_KNOW_PROPERTIES )) - { - switch (item.special) - { - case UNRAND_CEREBOV: - valued += 2000; - break; - - case UNRAND_ASMODEUS: - valued += 1500; - break; - - case UNRAND_ZONGULDROK: - valued += 1250; - break; - - case UNRAND_TORMENT: - case UNRAND_SINGING_SWORD: - case UNRAND_DISPATER: - valued += 1200; - break; - - case UNRAND_PRUNE: - case UNRAND_TROG: - valued += 1000; - break; - - case UNRAND_CURSES: - valued += 800; - break; - - case UNRAND_VARIABILITY: - valued += 700; - break; - - default: - valued += 1000; - break; - } - break; - } - - } // end uniques - switch (item.sub_type) { case WPN_CLUB: |