summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/arena.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-06-25 09:30:14 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-06-25 09:30:14 +0000
commit1a725b5ffa8cbc23e7b85cf787cdb1835005ce76 (patch)
tree7e1c83828b3ad1849ca30fb9cb8f761d7df630ce /crawl-ref/source/arena.cc
parent5b10a9fe6e2bbb600c850ac84463f204cd999627 (diff)
downloadcrawl-ref-1a725b5ffa8cbc23e7b85cf787cdb1835005ce76.tar.gz
crawl-ref-1a725b5ffa8cbc23e7b85cf787cdb1835005ce76.zip
Apply r10037 to trunk: arena documentation.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10039 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/arena.cc')
-rw-r--r--crawl-ref/source/arena.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/crawl-ref/source/arena.cc b/crawl-ref/source/arena.cc
index 09bc41ef25..1e825db7e7 100644
--- a/crawl-ref/source/arena.cc
+++ b/crawl-ref/source/arena.cc
@@ -341,7 +341,8 @@ namespace arena
std::string arena_place = strip_tag_prefix(spec, "arena_place:");
if (!arena_place.empty())
{
- try {
+ try
+ {
place = level_id::parse_level_id(arena_place);
}
catch (const std::string &err)
@@ -350,12 +351,17 @@ namespace arena
arena_place.c_str(),
err.c_str());
}
+
if (place.level_type == LEVEL_LABYRINTH)
+ {
throw (std::string("Can't set arena place to the "
"labyrinth."));
+ }
else if (place.level_type == LEVEL_PORTAL_VAULT)
+ {
throw (std::string("Can't set arena place to a portal "
"vault."));
+ }
}
std::string glyphs = strip_tag_prefix(spec, "ban_glyphs:");