summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/monster.cc
diff options
context:
space:
mode:
authorDavid Lawrence Ramsey <dolorous@users.sourceforge.net>2009-11-19 06:13:56 -0600
committerDavid Lawrence Ramsey <dolorous@users.sourceforge.net>2009-11-19 06:31:39 -0600
commit88bcacdbb333e702aee3ed20710ffdb8cc66ca81 (patch)
tree918f22d5a0c7e4f5025e080d37455e8c8199982d /crawl-ref/source/monster.cc
parentad599ad1c85be1ffba72f5aacacf869fa85010ca (diff)
downloadcrawl-ref-88bcacdbb333e702aee3ed20710ffdb8cc66ca81.tar.gz
crawl-ref-88bcacdbb333e702aee3ed20710ffdb8cc66ca81.zip
Update what monsters can wield based on unholy/evil and unclean/chaotic.
Diffstat (limited to 'crawl-ref/source/monster.cc')
-rw-r--r--crawl-ref/source/monster.cc14
1 files changed, 9 insertions, 5 deletions
diff --git a/crawl-ref/source/monster.cc b/crawl-ref/source/monster.cc
index ccbdceabc1..fccd00e155 100644
--- a/crawl-ref/source/monster.cc
+++ b/crawl-ref/source/monster.cc
@@ -593,7 +593,7 @@ bool monsters::could_wield(const item_def &item, bool ignore_brand,
if (is_special_unrandom_artefact(item) && !crawl_state.arena)
return (false);
- // Wimpy monsters (e.g. kobold, goblin) can't use halberds, etc.
+ // Wimpy monsters (e.g. kobolds, goblins) can't use halberds, etc.
if (!check_weapon_wieldable_size(item, body_size()))
return (false);
@@ -614,14 +614,18 @@ bool monsters::could_wield(const item_def &item, bool ignore_brand,
return (false);
// Holy monsters and monsters that are gifts of good gods won't
- // use evil weapons.
- if ((is_holy() || is_good_god(god)) && is_evil_item(item))
+ // use unholy or evil weapons.
+ if ((is_holy() || is_good_god(god))
+ && (is_unholy_item(item) || is_evil_item(item)))
+ {
return (false);
+ }
// Holy monsters that aren't gifts of chaotic gods and monsters
- // that are gifts of good gods won't use chaotic weapons.
+ // that are gifts of good gods won't use unclean or chaotic
+ // weapons.
if (((is_holy() && !is_chaotic_god(god)) || is_good_god(god))
- && is_chaotic_item(item))
+ && (is_unclean_item(item) || is_chaotic_item(item)))
{
return (false);
}