summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/makeitem.cc
diff options
context:
space:
mode:
authorJude Brown <bookofjude@users.sourceforge.net>2009-11-08 12:12:55 +1000
committerJude Brown <bookofjude@users.sourceforge.net>2009-11-08 12:14:23 +1000
commit52b47e9dd004853b02eee608b0e023dd2011e1d0 (patch)
tree98a37c16c6edab22a9155825242ee10fd3f98f9f /crawl-ref/source/makeitem.cc
parent9d183aa841a13505fa057184c70f96406024e52d (diff)
downloadcrawl-ref-52b47e9dd004853b02eee608b0e023dd2011e1d0.tar.gz
crawl-ref-52b47e9dd004853b02eee608b0e023dd2011e1d0.zip
Change hard-coded _give_wand exceptions to class flags.
New class flags: M_NO_WAND. Do not give this unique a wand. Currently applied to Gastronok, removing the hard-coded exception. M_NO_HT_WAND: don't give a high-tier wand to this monster, even if their HD is 5 or higher.
Diffstat (limited to 'crawl-ref/source/makeitem.cc')
-rw-r--r--crawl-ref/source/makeitem.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/crawl-ref/source/makeitem.cc b/crawl-ref/source/makeitem.cc
index 3567d9a90c..37fd3086e6 100644
--- a/crawl-ref/source/makeitem.cc
+++ b/crawl-ref/source/makeitem.cc
@@ -3324,7 +3324,7 @@ static void _give_scroll(monsters *mon, int level)
static void _give_wand(monsters *mon, int level)
{
- if (mons_is_unique(mon->type) && mon->type != MONS_GASTRONOK
+ if (mons_is_unique(mon->type) && !mons_class_flag(mon->type, M_NO_WAND)
&& (one_chance_in(5) || mon->type == MONS_MAURICE && one_chance_in(3)))
{
const int idx = items(0, OBJ_WANDS, OBJ_RANDOM, true, level, 0);
@@ -3335,7 +3335,7 @@ static void _give_wand(monsters *mon, int level)
item_def& wand = mitm[idx];
// Don't give top-tier wands before 5 HD.
- if (mon->hit_dice < 5)
+ if (mon->hit_dice < 5 || mons_class_flag(mon->type, M_NO_HT_WAND))
{
// Technically these wands will be undercharged, but it
// doesn't really matter.