summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/effects.cc
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-08-04 09:53:52 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-08-04 09:53:52 +0000
commit80c38b0682f61fc2901af257cc115676bacc9bde (patch)
tree2cf1867f8e12c70b520315921729b45c5744ed80 /crawl-ref/source/effects.cc
parent0f6113e43af895a5b9a893e61b2c6e899b735190 (diff)
downloadcrawl-ref-80c38b0682f61fc2901af257cc115676bacc9bde.tar.gz
crawl-ref-80c38b0682f61fc2901af257cc115676bacc9bde.zip
Fixed acquirement giving unwearable armour (Iaido).
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1961 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/effects.cc')
-rw-r--r--crawl-ref/source/effects.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc
index b213683e5d..66ce66797d 100644
--- a/crawl-ref/source/effects.cc
+++ b/crawl-ref/source/effects.cc
@@ -1155,14 +1155,16 @@ bool acquirement(object_class_type class_wanted, int agent)
continue;
const item_def &doodad(mitm[thing_created]);
- if (doodad.base_type == OBJ_WEAPONS
- && !can_wield(&doodad, false, true))
+ if ((doodad.base_type == OBJ_WEAPONS
+ && !can_wield(&doodad, false, true))
+ || (doodad.base_type == OBJ_ARMOUR
+ && !can_wear_armour(doodad, false, true)))
{
destroy_item(thing_created);
thing_created = NON_ITEM;
continue;
}
-
+
// MT - Check: god-gifted weapons and armor shouldn't kill you.
// Except Xom.
if ((agent == GOD_TROG || agent == GOD_OKAWARU)