summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/shopping.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-04-25 18:59:44 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-04-25 18:59:44 +0000
commit961769a9f994c0ed8aec6b17de0f98e24ec9f675 (patch)
tree560784acd53a267424a80292ace3e0326d14d669 /crawl-ref/source/shopping.cc
parent12cf2b007a44c64d0a6ad2208a2b60902e80c041 (diff)
downloadcrawl-ref-961769a9f994c0ed8aec6b17de0f98e24ec9f675.tar.gz
crawl-ref-961769a9f994c0ed8aec6b17de0f98e24ec9f675.zip
Allow monsters to pick up and exchange armour if they find something
better. This will only happen if the armour will fit the monster (correct size) and if the new armour has a better AC, or both items have the same AC but the new armour has a higher value (uses shopping values). Matching racial type (orcish for orcs, elven for elves) doubles an item's value, so between two plain +0 ring mails, one orcish one not, an orc will always prefer the former. Friendly monsters now may pick up items dropped by other friendlies. This means that they can re-collect their own thrown missiles, and that they can upgrade from stuff dropped by their fallen comrades. Hey, that's monster AI in action! :) They still won't pick up stuff randomly lying around, and neutrals or enslaved monsters never will pick up anything. And of course, friendly jellies (should that be possible) won't ever devour items. Cleanup of mstuff2.cc, and reduce chances for Beogh orcs' chattiness (again). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4632 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/shopping.cc')
-rw-r--r--crawl-ref/source/shopping.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/crawl-ref/source/shopping.cc b/crawl-ref/source/shopping.cc
index 217d0b0b9c..c988df87a5 100644
--- a/crawl-ref/source/shopping.cc
+++ b/crawl-ref/source/shopping.cc
@@ -771,7 +771,7 @@ unsigned int item_value( item_def item, bool ident )
valued += 50;
}
else if (item_type_known(item)
- && get_equip_desc(item) != 0)
+ && get_equip_desc(item) != 0)
{
valued += 20;
}
@@ -992,7 +992,7 @@ unsigned int item_value( item_def item, bool ident )
}
if (get_equip_race(item) == ISFLAG_ELVEN
- || get_equip_race(item) == ISFLAG_DWARVEN)
+ || get_equip_race(item) == ISFLAG_DWARVEN)
{
valued *= 12;
valued /= 10;