summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/tutorial.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-05-26 08:39:40 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-05-26 08:39:40 +0000
commitd73035c53987d171d07b7a39fdd23caf4f5967f5 (patch)
tree2ddfd427fd6d4242024a094f6d5fdf1ec0ba60ee /crawl-ref/source/tutorial.cc
parent043b5d69de4ee9f8b952488b1dc7e64a12d22f21 (diff)
downloadcrawl-ref-d73035c53987d171d07b7a39fdd23caf4f5967f5.tar.gz
crawl-ref-d73035c53987d171d07b7a39fdd23caf4f5967f5.zip
Add a tutorial trigger for the highly unlikely case the player
encounters a monster (oklob plant, hostile statue) during the tutorial that triggers an autoexclusion. There really needs to be an in-game way of explaining what they're for when such an autoexclusion happens to the player for the first time, particularly for the tiles build where excluded grids are visibly different from non-excluded ones. I'm afraid the FAQ is too obscure for this one, as well. Maybe add something to descriptions of monsters that have an exclusion centered on them? git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9831 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/tutorial.cc')
-rw-r--r--crawl-ref/source/tutorial.cc41
1 files changed, 41 insertions, 0 deletions
diff --git a/crawl-ref/source/tutorial.cc b/crawl-ref/source/tutorial.cc
index c46540b440..b11e93a761 100644
--- a/crawl-ref/source/tutorial.cc
+++ b/crawl-ref/source/tutorial.cc
@@ -430,6 +430,8 @@ static std::string _tut_debug_list(int event)
return "learned about auto-explore";
case TUT_DONE_EXPLORE:
return "explored a level";
+ case TUT_AUTO_EXCLUSION:
+ return "learned about exclusions";
case TUT_YOU_MUTATED:
return "caught a mutation";
case TUT_NEW_ABILITY_GOD:
@@ -2631,6 +2633,32 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
}
break;
+ case TUT_AUTO_EXCLUSION:
+ // In the highly unlikely case the player encounters a
+ // hostile statue or oklob plant during the tutorial...
+ viewwindow(true, false);
+ if (Options.tut_explored)
+ {
+ // Hack: Reset tut_just_triggered, to force recursive calling of
+ // learned_something_new().
+ Options.tut_just_triggered = false;
+ learned_something_new(TUT_AUTO_EXPLORE);
+ Options.tut_just_triggered = true;
+ }
+ text << "\nTo prevent autotravel or autoexplore taking you into "
+ "dangerous territory, you can set travel exclusions by "
+ "entering the map view (<w>X</w>) and then toggling the "
+ "exclusion radius on the monster position with <w>e</w>. "
+ "To make this easier some immobile monsters listed in the "
+ "<w>auto_exclude</w> option (such as this one) are considered "
+ "dangerous enough to warrant an automatic setting of an "
+ "exclusion. It will be automatically cleared if you manage to "
+ "kill the monster. You could also manually remove the "
+ "exclusion with <w>Xee</w> but unless you remove this monster "
+ "from the auto_exclude list, the exclusion will be reset the "
+ "next turn.";
+ break;
+
case TUT_NEED_HEALING:
text << "If you're low on hitpoints or magic and there's no urgent "
"need to move, you can rest for a bit. Ideally, you should "
@@ -4106,6 +4134,19 @@ static void _tutorial_describe_feature(int x, int y)
Options.tutorial_events[TUT_SEEN_PORTAL] = false;
break;
+ case DNGN_CLOSED_DOOR:
+ if (!Options.tut_explored)
+ {
+ ostr << "\nTo avoid accidentally opening a door you'd rather "
+ "remain closed during travel or autoexplore, you can "
+ "mark it with an exclusion from the map view "
+ "(<w>X</w>) with <w>ee</w> while your cursor is on the "
+ "grid in question. Such an exclusion will prevent "
+ "autotravel from ever entering that grid until you "
+ "remove the exclusion with another press of <w>Xe</w>.";
+ }
+ break;
+
default:
if (feat >= DNGN_ALTAR_FIRST_GOD && feat <= DNGN_ALTAR_LAST_GOD)
{