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>2008-05-15 09:39:09 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-05-15 09:39:09 +0000
commit6b01f8a9a0e4d0cfbad1beb76002810d8e0203a8 (patch)
tree1291287ce0c9443d6911c4ecd0ec2d3b8ebd77ae /crawl-ref/source/tutorial.cc
parent66740a30c6be993c636285d8351ad0f50c1a8ec7 (diff)
downloadcrawl-ref-6b01f8a9a0e4d0cfbad1beb76002810d8e0203a8.tar.gz
crawl-ref-6b01f8a9a0e4d0cfbad1beb76002810d8e0203a8.zip
Add a tutorial hint for encountering an invisible monster and offer a
different healing message if you recently met an invisible monster, as suggested in FR 1964267. Killing an invisible monster does not yet reset the counter, though I guess it should. Also, disallow randart weapons to be named after Sif Muna. (Vehumet, too, maybe?) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5052 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/tutorial.cc')
-rw-r--r--crawl-ref/source/tutorial.cc63
1 files changed, 52 insertions, 11 deletions
diff --git a/crawl-ref/source/tutorial.cc b/crawl-ref/source/tutorial.cc
index eea9634b97..c7765e2412 100644
--- a/crawl-ref/source/tutorial.cc
+++ b/crawl-ref/source/tutorial.cc
@@ -155,6 +155,9 @@ bool pick_tutorial()
// for occasional healing reminders
Options.tut_last_healed = 0;
+ // Did the player recently see a monster turn invisible?
+ Options.tut_seen_invisible = 0;
+
Options.random_pick = true; // random choice of starting spellbook
Options.weapon = WPN_HAND_AXE; // easiest choice for fighters
return true;
@@ -362,6 +365,10 @@ static std::string _tut_debug_list(int event)
return "needed healing";
case TUT_NEED_POISON_HEALING:
return "needed healing for poison";
+ case TUT_INVISIBLE_DANGER:
+ return "encountered an invisible foe";
+ case TUT_NEED_HEALING_INVIS:
+ return "had to heal near an unseen monster";
case TUT_POSTBERSERK:
return "learned about Berserk aftereffects";
case TUT_RUN_AWAY:
@@ -640,17 +647,22 @@ void tutorial_death_screen()
}
else
{
- int hint = random2(6);
- // If a character has been unusually busy with projectiles and spells
- // give some other hint rather than the first one.
- if (hint == 0 && Options.tut_throw_counter + Options.tut_spell_counter
+ int hint = random2(6);
+ // If a character has been unusually busy with projectiles and spells
+ // give some other hint rather than the first one.
+ if (hint == 0 && Options.tut_throw_counter + Options.tut_spell_counter
>= Options.tut_melee_counter)
- {
- hint = random2(5)+1;
- }
+ {
+ hint = random2(5)+1;
+ }
+ // FIXME: The hints below could be somewhat less random, so that e.g.
+ // the message for fighting several monsters in a corridor only happens
+ // if there's more than one monster around and you're not in a corridor,
+ // or the one about using consumable objects only if you actually have
+ // any (useful or unidentified) scrolls/wands/potions.
- switch(hint)
- {
+ switch (hint)
+ {
case 0:
text = "Always consider using projectiles, wands or spells before "
"engaging monsters in close combat.";
@@ -698,7 +710,7 @@ void tutorial_death_screen()
default:
text = "Sorry, no hint this time, though there should have been "
"one.";
- }
+ }
}
formatted_message_history(text, MSGCH_TUTORIAL, 0, _get_tutorial_cols());
more();
@@ -844,6 +856,14 @@ void tutorial_healing_reminder()
if (Options.tutorial_events[TUT_NEED_POISON_HEALING])
learned_something_new(TUT_NEED_POISON_HEALING);
}
+ else if (Options.tut_seen_invisible > 0
+ && you.num_turns < Options.tut_seen_invisible - 20)
+ {
+ // If we recently encountered an invisible monster, we need a
+ // special message.
+ learned_something_new(TUT_NEED_HEALING_INVIS);
+ // If that one was already displayed, don't print a reminder.
+ }
else
{
if (Options.tutorial_events[TUT_NEED_HEALING])
@@ -1161,7 +1181,7 @@ void learned_something_new(tutorial_event_type seen_what, int x, int y)
case TUT_SEEN_WAND:
text << "You have picked up your first wand"
#ifndef USE_TILE
- " ('<w>/</w>'). Type"
+ " ('<w>/</w>'). Type "
#else
". Simply click on it with your <w>left mouse button</w>, or "
"type "
@@ -1789,6 +1809,27 @@ void learned_something_new(tutorial_event_type seen_what, int x, int y)
"luck!";
break;
+ case TUT_INVISIBLE_DANGER:
+ text << "Fighting against a monster you cannot see is difficult. "
+ "Your best bet is probably a strategic retreat, be it via "
+ "teleportation or by getting off the level. "
+ "Or else, luring the monster into a corridor should at least "
+ "make it easier for you to hit it.";
+
+ // to prevent this text being immediately followed by the next one
+ Options.tut_last_healed = you.num_turns - 30;
+ break;
+
+ case TUT_NEED_HEALING_INVIS:
+ text << "You recently noticed an invisible monster, so resting might "
+ "not be safe. If you still need to replenish your hitpoints "
+ "or magic, you'll have to quaff an appropriate potion. For "
+ "normal resting you will first have to get away from the "
+ "danger.";
+
+ Options.tut_last_healed = you.num_turns;
+ break;
+
case TUT_POSTBERSERK:
text << "Berserking is extremely exhausting! It burns a lot of "
"nutrition, and afterwards you are slowed down and "