diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-10-12 18:10:06 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-10-12 18:10:06 +0000 |
commit | 2021abd7d55438c0ffd9093a63d2b9fad27996ab (patch) | |
tree | d561ce5f21e9b4aaef345b5ac4583c66118ee051 /crawl-ref/source/mon-util.cc | |
parent | 1d5ad19b8624027a6240d859ea5d7e9b14f645ed (diff) | |
download | crawl-ref-2021abd7d55438c0ffd9093a63d2b9fad27996ab.tar.gz crawl-ref-2021abd7d55438c0ffd9093a63d2b9fad27996ab.zip |
Account for randart shields when scanning monsters' inventories for
randarts.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7226 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/mon-util.cc')
-rw-r--r-- | crawl-ref/source/mon-util.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc index faabc62d20..c073d83d35 100644 --- a/crawl-ref/source/mon-util.cc +++ b/crawl-ref/source/mon-util.cc @@ -338,6 +338,7 @@ static int _scan_mon_inv_randarts(const monsters *mon, const int weapon = mon->inv[MSLOT_WEAPON]; const int second = mon->inv[MSLOT_MISSILE]; // Two-headed ogres, etc. const int armour = mon->inv[MSLOT_ARMOUR]; + const int shield = mon->inv[MSLOT_SHIELD]; if (weapon != NON_ITEM && mitm[weapon].base_type == OBJ_WEAPONS && is_random_artefact( mitm[weapon] )) @@ -356,6 +357,12 @@ static int _scan_mon_inv_randarts(const monsters *mon, { ret += randart_wpn_property( mitm[armour], ra_prop ); } + + if (shield != NON_ITEM && mitm[shield].base_type == OBJ_ARMOUR + && is_random_artefact( mitm[shield] )) + { + ret += randart_wpn_property( mitm[shield], ra_prop ); + } } return (ret); |