summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crawl-ref/source/misc.cc28
-rw-r--r--crawl-ref/source/tutorial.cc2
2 files changed, 25 insertions, 5 deletions
diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc
index b14ae92f3a..64fe325825 100644
--- a/crawl-ref/source/misc.cc
+++ b/crawl-ref/source/misc.cc
@@ -1700,6 +1700,25 @@ static bool _stair_moves_pre(dungeon_feature_type stair)
return (true);
}
+static bool _check_carrying_orb()
+{
+ // We never picked up the Orb, all's okay.
+ if (you.char_direction != GDT_ASCENDING)
+ return (true);
+
+ // So we did pick up the Orb. Now check whether we're carrying it.
+ for (int i = 0; i < ENDOFPACK; i++)
+ {
+ if (is_valid_item( you.inv[i] )
+ && you.inv[i].base_type == OBJ_ORBS
+ && you.inv[i].sub_type == ORB_ZOT)
+ {
+ return (true);
+ }
+ }
+ return (yes_or_no("You're not carrying the Orb! Leave anyway"));
+}
+
void up_stairs(dungeon_feature_type force_stair,
entry_cause_type entry_cause)
{
@@ -1761,7 +1780,8 @@ void up_stairs(dungeon_feature_type force_stair,
&& !destination_override.is_valid();
if (leaving_dungeon
- && !yesno("Are you sure you want to leave the Dungeon?", false, 'n'))
+ && (!yesno("Are you sure you want to leave the Dungeon?", false, 'n')
+ || !_check_carrying_orb()))
{
mpr("Alright, then stay!");
return;
@@ -1860,9 +1880,9 @@ void up_stairs(dungeon_feature_type force_stair,
viewwindow(true, true);
- // Left Zot without enough runes to get back in (probably because
- // of dropping some runes within Zot), but need to get back in Zot
- // to get the Orb? Xom finds that funny.
+ // Left Zot without enough runes to get back in (because they were
+ // destroyed), but need to get back in Zot to get the Orb?
+ // Xom finds that funny.
if (stair_find == DNGN_RETURN_FROM_ZOT
&& branches[BRANCH_HALL_OF_ZOT].branch_flags & BFLAG_HAS_ORB)
{
diff --git a/crawl-ref/source/tutorial.cc b/crawl-ref/source/tutorial.cc
index 7569039127..abd8985d8e 100644
--- a/crawl-ref/source/tutorial.cc
+++ b/crawl-ref/source/tutorial.cc
@@ -4239,7 +4239,7 @@ static void _tutorial_describe_feature(int x, int y)
{
ostr << "These stairs lead out of the dungeon. Following them "
"will end the game. The only way to win is to "
- "transport the fabled orb of Zot outside.";
+ "transport the fabled Orb of Zot outside.";
}
else
{