diff options
author | Darshan Shaligram <dshaligram@users.sourceforge.net> | 2010-02-27 19:53:48 +0530 |
---|---|---|
committer | Darshan Shaligram <dshaligram@users.sourceforge.net> | 2010-02-27 20:01:01 +0530 |
commit | 3340529f1d77571c0de8f7e63600ee561ff6b3a3 (patch) | |
tree | b95213580944656ab68a64db1abd188f6b3a5d32 /crawl-ref/source/l_debug.cc | |
parent | 70f0ac54e5f8a4157a4630ead194a0d2a8abf46f (diff) | |
download | crawl-ref-3340529f1d77571c0de8f7e63600ee561ff6b3a3.tar.gz crawl-ref-3340529f1d77571c0de8f7e63600ee561ff6b3a3.zip |
Report parent level in branch entry milestones.
When generating a milestone for entering a new area, include the level
containing the entry stair/portal in the 'oplace' key. This will allow Henzell
to report the dungeon level containing the Lair entrance, wizlab, etc.
This isn't perfect: oplace will be plain Wrong when the player uses the Trowel
card to create portal vaults outside the main dungeon (such as Trowel in
Pandemonium). Trowel is generally problematic outside the dungeon
(see http://crawl.develz.org/mantis/view.php?id=960).
Since Ziggurats can legitimately be generated in Pandemonium, generate ziggurat
entry milestones in the onclimb event of the ziggurat portal, instead of
waiting until the player has entered the Ziggurat. Unfortunately this means
that the entry place for Ziggurats will be reported in the 'place' field
instead of 'oplace'.
I recommend that this change not be included in 0.6, since we need additional
work to fix Trowel and other issues before we have full milestone sanity.
Diffstat (limited to 'crawl-ref/source/l_debug.cc')
-rw-r--r-- | crawl-ref/source/l_debug.cc | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/crawl-ref/source/l_debug.cc b/crawl-ref/source/l_debug.cc index 84110eb484..14091826de 100644 --- a/crawl-ref/source/l_debug.cc +++ b/crawl-ref/source/l_debug.cc @@ -44,15 +44,9 @@ LUAFN(debug_goto_place) const level_id id = level_id::parse_level_id(luaL_checkstring(ls, 1)); const int bind_entrance = lua_isnumber(ls, 2)? luaL_checkint(ls, 2) : -1; - you.level_type = id.level_type; - if (id.level_type == LEVEL_DUNGEON) - { - you.where_are_you = static_cast<branch_type>(id.branch); - you.absdepth0 = absdungeon_depth(id.branch, id.depth); - - if (bind_entrance != -1) - branches[you.where_are_you].startdepth = bind_entrance; - } + you.goto_place(id); + if (id.level_type == LEVEL_DUNGEON && bind_entrance != -1) + branches[you.where_are_you].startdepth = bind_entrance; } catch (const std::string &err) { |