summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mapdef.cc
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-07-04 09:00:04 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-07-04 09:00:04 +0000
commit6e8d91afe0a93353fac5c3120c6c6bc2601c2e8f (patch)
tree91a42ea41ad2d378101e27795dec37ee5b15914a /crawl-ref/source/mapdef.cc
parent7b960a89ece3e8d66abeee2ef8b49a5bc9e90b0a (diff)
downloadcrawl-ref-6e8d91afe0a93353fac5c3120c6c6bc2601c2e8f.tar.gz
crawl-ref-6e8d91afe0a93353fac5c3120c6c6bc2601c2e8f.zip
Allow maps to specify item quantities with the q:N syntax in item specs.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1745 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/mapdef.cc')
-rw-r--r--crawl-ref/source/mapdef.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/crawl-ref/source/mapdef.cc b/crawl-ref/source/mapdef.cc
index 5e46f86774..65592df4b5 100644
--- a/crawl-ref/source/mapdef.cc
+++ b/crawl-ref/source/mapdef.cc
@@ -2078,6 +2078,10 @@ item_spec item_list::parse_single_spec(std::string s)
}
}
+ const int qty = strip_number_tag(s, "q:");
+ if (qty != TAG_UNFOUND)
+ result.qty = qty;
+
if (strip_tag(s, "good_item"))
result.level = MAKE_GOOD_ITEM;
else