summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mapdef.cc
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2008-11-23 13:07:05 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2008-11-23 13:07:05 +0000
commit76c82d66daed178db22ec0fe9bd91cfb23cfb28c (patch)
tree05d1029ebd67e95c404d05ad9ef5e4e46b83701e /crawl-ref/source/mapdef.cc
parentf3b465a2e3fa4d16eaf9ff89065fa3a67c2775ea (diff)
downloadcrawl-ref-76c82d66daed178db22ec0fe9bd91cfb23cfb28c.tar.gz
crawl-ref-76c82d66daed178db22ec0fe9bd91cfb23cfb28c.zip
Allow .des files to place manuals with names as "manual of Fighting" or "random manual" (dpeg).
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7549 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/mapdef.cc')
-rw-r--r--crawl-ref/source/mapdef.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/crawl-ref/source/mapdef.cc b/crawl-ref/source/mapdef.cc
index fbb2dc5880..1c6a82c4cc 100644
--- a/crawl-ref/source/mapdef.cc
+++ b/crawl-ref/source/mapdef.cc
@@ -2660,6 +2660,15 @@ void item_list::parse_random_by_class(std::string c, item_spec &spec)
}
}
+ // Random manual?
+ if (c == "manual")
+ {
+ spec.base_type = OBJ_BOOKS;
+ spec.sub_type = BOOK_MANUAL;
+ spec.plus = -1;
+ return;
+ }
+
error = make_stringf("Bad item class: '%s'", c.c_str());
}
@@ -2677,6 +2686,8 @@ void item_list::parse_raw_name(std::string name, item_spec &spec)
{
spec.base_type = parsed.base_type;
spec.sub_type = parsed.sub_type;
+ spec.plus = parsed.plus;
+ spec.plus2 = parsed.plus2;
return;
}