From 38dd6131c56df7aea305508493d95de2471b562d Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Sun, 9 Mar 2008 15:11:15 +0000 Subject: [FR 1909388] Command key changes new key command old key ------- ------- ------- z cast spell Z Z zap wand z c chop up D, Dissect C close door c O open door o o auto-explore Ctrl-O Ctrl-O Dungeon overview O v evoke E E show experience C t shout ! ! annotate level Ctrl-I Also changed the entire tutorial to match the new settings, and modified several references in the game. Other changes: * Another tutorial cleanup, so you now can really change the channel colour and have it work. * A belated mon_glyph colour swap: giant newt (was lightgreen, now green) and giant lizard (was green, now lightgreen). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3553 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/tutorial.cc | 446 ++++++++++++++++++++++++------------------- 1 file changed, 247 insertions(+), 199 deletions(-) (limited to 'crawl-ref/source/tutorial.cc') diff --git a/crawl-ref/source/tutorial.cc b/crawl-ref/source/tutorial.cc index a905c928ac..7e5b0a5d70 100644 --- a/crawl-ref/source/tutorial.cc +++ b/crawl-ref/source/tutorial.cc @@ -37,7 +37,7 @@ #include "stuff.h" #include "terrain.h" #ifdef USE_TILE -#include "tiles.h" + #include "tiles.h" #endif #include "view.h" @@ -127,7 +127,7 @@ bool pick_tutorial() if (keyn >= 'a' && keyn <= 'a' + TUT_TYPES_NUM - 1) { Options.tutorial_type = keyn - 'a'; - you.species = get_tutorial_species(Options.tutorial_type); + you.species = get_tutorial_species(Options.tutorial_type); you.char_class = get_tutorial_job(Options.tutorial_type); // activate all triggers @@ -136,14 +136,14 @@ bool pick_tutorial() // store whether explore, stash search or travelling was used Options.tut_explored = true; - Options.tut_stashes = true; - Options.tut_travel = true; + Options.tut_stashes = true; + Options.tut_travel = true; // used to compare which fighting means was used most often - Options.tut_spell_counter = 0; - Options.tut_throw_counter = 0; + Options.tut_spell_counter = 0; + Options.tut_throw_counter = 0; + Options.tut_melee_counter = 0; Options.tut_berserk_counter = 0; - Options.tut_melee_counter = 0; // for occasional healing reminders Options.tut_last_healed = 0; @@ -157,10 +157,10 @@ bool pick_tutorial() { // in this case, undo previous choices // set_startup_options(); - you.species = SP_UNKNOWN; + you.species = SP_UNKNOWN; you.char_class = JOB_UNKNOWN; - Options.race = 0; - Options.cls = 0; + Options.race = 0; + Options.cls = 0; } switch (keyn) @@ -174,7 +174,7 @@ bool pick_tutorial() case 'X': cprintf(EOL "Goodbye!"); end(0); - return false; // as if + return false; } } return false; @@ -434,12 +434,16 @@ static formatted_string tutorial_map_intro() { std::string result; - result = "" - "What you see here is the typical Crawl screen. The upper left map " - "shows your hero as the @ in the center. The parts " - "of the map you remember but cannot currently see will be greyed " - "out." - "" EOL; + result = "<"; + result += colour_to_str(channel_to_colour(MSGCH_TUTORIAL)); + result += ">"; + result += "What you see here is the typical Crawl screen. The upper left map " + "shows your hero as the @ in the center. The parts " + "of the map you remember but cannot currently see will be greyed " + "out."; + result += "" EOL; result += " --more-- Press Escape to skip the basics"; linebreak_string2(result,get_tutorial_cols()); @@ -451,33 +455,35 @@ static formatted_string tutorial_stats_intro() std::ostringstream istr; // Note: must fill up everything to override the map - istr << "" - "To the right, important properties of \n" - "the character are displayed. The most \n" - "basic one is your health, measured as \n" - "HP: " << you.hp << "/" << you.hp_max << ". "; + istr << "<" + << colour_to_str(channel_to_colour(MSGCH_TUTORIAL)) + << ">" + << "To the right, important properties of \n" + "the character are displayed. The most \n" + "basic one is your health, measured as \n" + "HP: " << you.hp << "/" << you.hp_max << ". "; if (Options.tutorial_type==TUT_MAGIC_CHAR) istr << " "; istr << - "These are your current out \n" - "of maximum health points. When health \n" - "drops to zero, you die. \n" - "Magic: " - << you.magic_points << "/" << you.max_magic_points << - " is your energy for casting \n" - "spells, although more mundane actions \n" - "often draw from Magic, too. \n" - "Further down, Strength, Dexterity and \n" - "Intelligence are shown and provide an \n" - "all-around account of the character's \n" - "attributes. \n" - "" - " \n" - " --more-- Press Escape to skip the basics\n" - " \n" - " \n"; + "These are your current out \n" + "of maximum health points. When health \n" + "drops to zero, you die. \n" + "Magic: " << you.magic_points << "/" << you.max_magic_points + << " is your energy for casting \n" + "spells, although more mundane actions \n" + "often draw from Magic, too. \n" + "Further down, Strength, Dexterity and \n" + "Intelligence are shown and provide an \n" + "all-around account of the character's \n" + "attributes. \n" + << "" + " \n" + " --more-- Press Escape to skip the basics\n" + " \n" + " \n"; + return formatted_string::parse_block(istr.str(), false); } @@ -485,12 +491,16 @@ static formatted_string tutorial_message_intro() { std::string result; - result = "" - "This lower part of the screen is reserved for messages. Everything " + result = "<"; + result += colour_to_str(channel_to_colour(MSGCH_TUTORIAL)); + result += ">"; + result += "This lower part of the screen is reserved for messages. Everything " "related to the tutorial is shown in this colour. If you missed " "something, previous messages can be read again with " - "Ctrl-P." - "" EOL; + "Ctrl-P."; + result += "" EOL; result += " --more-- Press Escape to skip the basics"; linebreak_string2(result,get_tutorial_cols()); @@ -605,8 +615,8 @@ void tutorial_death_screen() 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 (Options.tut_throw_counter + Options.tut_spell_counter - >= Options.tut_melee_counter && hint == 0) + if (hint == 0 && Options.tut_throw_counter + Options.tut_spell_counter + >= Options.tut_melee_counter) { hint = random2(5)+1; } @@ -658,7 +668,7 @@ void tutorial_death_screen() Options.tutorial_events.init(false); } -// if a character survives until Xp 5, the tutorial is declared finished +// if a character survives until Xp 7, the tutorial is declared finished // and they get a more advanced playing hint, depending on what they might // know by now void tutorial_finished() @@ -676,7 +686,7 @@ void tutorial_finished() if (Options.tut_explored) { text = "Walking around and exploring levels gets easier by using " - "auto-explore (Ctrl-O). You can even make Crawl " + "auto-explore (o). You can even make Crawl " "automatically pick up interesting items by setting the " "option explore_greedy=true in the init file."; } @@ -757,10 +767,10 @@ void tutorial_dissection_reminder(bool healthy) Options.tut_just_triggered = true; std::string text; - text += "If you don't want to eat it, consider Dissecting " + text += "If you don't want to eat it, consider chopping " "this corpse under prayer as a sacrifice to "; text += god_name(you.religion); - text += ". Whenever you view a corpse while in tutorial mode " + text += ". Whenever you view a corpse while in tutorial mode " "you can reread this information."; formatted_message_history(text, MSGCH_TUTORIAL, 0, get_tutorial_cols()); @@ -875,7 +885,6 @@ static std::string colourize_glyph(int col, unsigned glyph) text << ""; return text.str(); } - #endif static bool mons_is_highlighted(const monsters *mons) @@ -914,8 +923,8 @@ void tutorial_first_monster(const monsters &mon) text += colourize_glyph(col, ch); text += " is a monster, usually depicted by a letter. Some typical " - "early monsters look like r, g, " - "b or K. " + "early monsters look like r, l, " + "K or g. " #else // need to highlight monster const coord_def ep = grid2view(coord_def(mon.x, mon.y)); @@ -936,17 +945,17 @@ void tutorial_first_monster(const monsters &mon) if (Options.tutorial_type == TUT_RANGER_CHAR) { text = "However, as a hunter you will want to deal with it using your " - "bow. If you have a look at your bow with v, you'll " - "find an explanation of how to do this. First wield " - "it, then follow the instructions."; + "bow. If you have a look at your bow from your inventory, " + "you'll find an explanation of how to do this. First " + "wield it, then follow the instructions."; formatted_message_history(text, MSGCH_TUTORIAL, 0, get_tutorial_cols()); } else if (Options.tutorial_type == TUT_MAGIC_CHAR) { text = "However, as a conjurer you will want to deal with it using magic. " - "If you have a look at your spellbook with v, you'll " - "find an explanation of how to do this."; + "If you have a look at your spellbook from your inventory, " + "you'll find an explanation of how to do this."; formatted_message_history(text, MSGCH_TUTORIAL, 0, get_tutorial_cols()); } @@ -990,8 +999,8 @@ void tutorial_first_item(const item_def &item) "Once it is in your inventory, you can drop it again with " "d. Several types of objects will usually be picked up " "automatically." - "\nAny time you view an item, you can read about its " - "properties and description."; + "\nAny time you look at an item in your inventory, you can " + "read about its properties and description."; formatted_message_history(text, MSGCH_TUTORIAL, 0, get_tutorial_cols()); } @@ -1076,7 +1085,8 @@ void learned_something_new(tutorial_event_type seen_what, int x, int y) "spellcasting by reading lots of scrolls."; } text << "\nDuring the tutorial you can reread this information at " - "any time by viewing the item in question."; + "any time by having a look in your inventory at the " + "item in question."; break; case TUT_SEEN_WEAPON: @@ -1087,7 +1097,7 @@ void learned_something_new(tutorial_event_type seen_what, int x, int y) "you've picked up. " "Use w to wield it, but be aware that this weapon " "might train a different skill from your current one. You can " - "view the weapon's properties with v."; + "view the weapon's properties from your inventory."; if (Options.tutorial_type == TUT_BERSERK_CHAR) { @@ -1100,8 +1110,9 @@ void learned_something_new(tutorial_event_type seen_what, int x, int y) text << "This is the first stack of missiles (')') you've " "picked up. Darts can be thrown by hand, but other missile types " "like arrows and needles require a launcher and training in " - "using it to be really effective. v gives more " - "information about both missiles and launcher."; + "using it to be really effective. Selecting the item in your " + "inventory gives more information about both missiles " + "and launcher."; if (Options.tutorial_type == TUT_RANGER_CHAR) { @@ -1128,7 +1139,7 @@ void learned_something_new(tutorial_event_type seen_what, int x, int y) #endif "you've picked up. Use W to wear it and " "T to take it off again. You can view its " - "properties with v."; + "properties from your inventory."; if (you.species == SP_CENTAUR || you.species == SP_MINOTAUR) { @@ -1159,19 +1170,20 @@ void learned_something_new(tutorial_event_type seen_what, int x, int y) " ('%')" #endif ". When a corpse is lying on the ground, you can " - "Dissect with a sharp implement. Once hungry you " - "can eat the resulting chunks (though they may " + "chop it up with a sharp implement. Once hungry you " + "can then eat the resulting chunks (though they may " "not be healthy)."; if (god_likes_butchery(you.religion)) { text << " During prayer you can offer corpses to " << god_name(you.religion) - << " by dissecting them, as well. Note that the gods will not " + << " by chopping them, as well. Note that the gods will not " << "accept rotting flesh."; } text << "\nDuring the tutorial you can reread this information at " - "any time by viewing the item in question."; + "any time by selecting the item in question in your " + "inventory."; break; case TUT_SEEN_JEWELLERY: @@ -1184,14 +1196,15 @@ void learned_something_new(tutorial_event_type seen_what, int x, int y) << " ('\"')" #endif << ". Type P to put it on and R to remove " - "it. You can view it with v although often magic " - "is necessary to reveal its true nature."; + "it. You can view its properties from your inventory, " + "although often magic is necessary to reveal its true nature."; break; case TUT_SEEN_MISC: text << "This is a curious object indeed. You can play around with it " "to find out what it does by wielding and " - "Evoking it."; + "evoking it. As usually, selecting it from your " + "inventory might give you more information."; break; case TUT_SEEN_STAFF: @@ -1206,18 +1219,24 @@ void learned_something_new(tutorial_event_type seen_what, int x, int y) "Magicians use staves to increase their power in certain spell " "schools. By contrast, a rod allows the casting of certain " "spells even without magic knowledge simply by " - "Evoking it. For the latter the power depends on " + "evoking it. For the latter the power depends on " "your Evocations skill."; text << "\nDuring the tutorial you can reread this information at " - "any time by viewing the item in question."; + "any time by selecting the item in question in your " + "inventory."; break; case TUT_SEEN_STAIRS: + // don't give this information during the first turn if (you.num_turns < 1) return; text << "These "; #ifndef USE_TILE + // monsters standing on stairs + if (mgrd[ex][ey] != NON_MONSTER) + return; + object = env.show[ex][ey]; colour = env.show_col[ex][ey]; { unsigned short dummy; get_item_symbol( object, &ch, &dummy ); } @@ -1243,7 +1262,8 @@ void learned_something_new(tutorial_event_type seen_what, int x, int y) colour = env.show_col[ex][ey]; get_item_symbol( object, &ch, &colour ); - text << colourize_glyph(colour, ch) << " "; + text << colourize_glyph(colour, ch); + text << " "; #else tile_place_cursor(ep.x-1,ep.y-1,true); #endif @@ -1325,10 +1345,12 @@ void learned_something_new(tutorial_event_type seen_what, int x, int y) "Spellcasting skills."; if (you.religion == GOD_TROG) + { text << " Also, kills of living creatures are automatically " "dedicated to " << god_name(you.religion) << "."; + } break; case TUT_NEW_LEVEL: @@ -1394,7 +1416,7 @@ void learned_something_new(tutorial_event_type seen_what, int x, int y) case TUT_YOU_HUNGRY: text << "There are two ways to overcome hunger: food you started " "with or found, and selfmade chunks from corpses. To get the " - "latter, all you need to do is Dissect a corpse " + "latter, all you need to do is chop up a corpse " "with a sharp implement. Your starting weapon will do nicely. " "Try to dine on chunks in order to save permanent food."; @@ -1441,7 +1463,7 @@ void learned_something_new(tutorial_event_type seen_what, int x, int y) case TUT_MAKE_CHUNKS: text << "How lucky! That monster left a corpse which you can now " - "Dissect. One or more chunks will appear that you " + "chop up. One or more chunks will appear that you " "can then eat. Beware that some chunks may be, " "sometimes or always, hazardous. Only experience can help " "you here."; @@ -1464,16 +1486,16 @@ void learned_something_new(tutorial_event_type seen_what, int x, int y) text << "Hey, that monster left a corpse! If you don't need it for " "food or other purposes, you can sacrifice it to " << god_name(you.religion) - << " by Dissecting it while praying."; + << " by chopping it while praying."; break; - + case TUT_SHIFT_RUN: text << "Walking around takes fewer keystrokes if you press " "Shift-direction or / direction. " "That will let you run until a monster comes into sight or " "your character sees something interesting."; break; - + case TUT_MAP_VIEW: text << "As you explore a level, orientation can become difficult. " "Press X to bring up the level map. Typing " @@ -1482,7 +1504,7 @@ void learned_something_new(tutorial_event_type seen_what, int x, int y) ". or Enter lets your character move " "there on its own."; break; - + case TUT_DONE_EXPLORE: text << "You have explored the dungeon on this level. The downstairs look " "like '>'. Proceed there and press > to " @@ -1504,35 +1526,35 @@ void learned_something_new(tutorial_event_type seen_what, int x, int y) "Shift-numpad 5."; } 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. Press 5 or " "shift-numpad-5 to do so."; break; - + case TUT_NEED_POISON_HEALING: text << "Your poisoning could easily kill you, so now would be a good " "time to quaff a potion of heal wounds or, better " "yet, a potion of healing. If you have seen neither of these so " "far, try unknown ones in your inventory. Good luck!"; break; - + case TUT_POSTBERSERK: text << "Berserking is extremely exhausting! It burns a lot of nutrition, " "and afterwards you are slowed down and occasionally even pass " "out. Press @ to see your current status."; break; - + case TUT_RUN_AWAY: text << "Whenever you've got only a few hitpoints left and you're in " "danger of dying, check your options carefully. Often, retreat or " "use of some item might be a viable alternative to fighting on."; - + if (you.species == SP_CENTAUR) text << " As a four-legged centaur you are particularly quick - " "running is an option!"; - + if (Options.tutorial_type == TUT_BERSERK_CHAR && you.religion == GOD_TROG && !you.duration[DUR_BERSERKER] && !you.duration[DUR_EXHAUSTED] && you.hunger_state >= HS_SATIATED) @@ -1543,13 +1565,13 @@ void learned_something_new(tutorial_event_type seen_what, int x, int y) "to temporarily gain more hitpoints and greater strength. "; } break; - + case TUT_RETREAT_CASTER: text << "Without magical power you're unable to cast spells. While " "melee is a possibility, that's not where your strengths lie, " "so retreat (if possible) might be the better option."; break; - + case TUT_YOU_MUTATED: text << "Mutations can be obtained from several sources, among them " "potions, spell miscasts, and overuse of strong enchantments " @@ -1558,12 +1580,12 @@ void learned_something_new(tutorial_event_type seen_what, int x, int y) "harmful as beneficial mutations, and most of them have three " "levels. Check your mutations with A."; break; - + case TUT_NEW_ABILITY: text << "You just gained a new ability. Press a to take a " "look at your abilities or to use one of them."; break; - + case TUT_WIELD_WEAPON: if (Options.tutorial_type == TUT_RANGER_CHAR && you.inv[ you.equip[EQ_WEAPON] ].sub_type == WPN_BOW) @@ -1572,14 +1594,14 @@ void learned_something_new(tutorial_event_type seen_what, int x, int y) "b by pressing '."; } break; - + case TUT_FLEEING_MONSTER: if (!Options.tutorial_type == TUT_BERSERK_CHAR) return; - + text << "While unsporting, it is sometimes useful to attack a fleeing " "monster by throwing something after it. To do this, press " - "t, choose a throwing weapon, e.g. one of your " + "f, choose a throwing weapon, e.g. one of your " "spears, use + to select a monster and press " "., f or Enter. The closest " "monster will be autoselected. If you've got the fire_order " @@ -1587,7 +1609,7 @@ void learned_something_new(tutorial_event_type seen_what, int x, int y) "f+. instead; the game will pick the first weapon " "that fits the option."; break; - + case TUT_MONSTER_BRAND: #ifdef USE_TILE tile_place_cursor(ep.x-1,ep.y-1,true); @@ -1596,11 +1618,11 @@ void learned_something_new(tutorial_event_type seen_what, int x, int y) "it a bit more closely by pressing x and moving " "the cursor onto its square."; break; - + case TUT_SEEN_MONSTER: case TUT_SEEN_FIRST_OBJECT: break; - + default: text << "You've found something new (but I don't know what)!"; } @@ -1618,12 +1640,13 @@ void learned_something_new(tutorial_event_type seen_what, int x, int y) formatted_string tut_abilities_info() { std::ostringstream text; - text << "" + text << "<" << colour_to_str(channel_to_colour(MSGCH_TUTORIAL)) << ">"; + text << "This screen shows your character's set of talents. You can gain new " EOL "abilities via certain items, through religion or by way of mutations. " EOL "Activation of an ability usually comes at a cost, e.g. nutrition or " EOL "Magic power. "; - + if (you.religion != GOD_NO_GOD) { text << @@ -1636,7 +1659,7 @@ formatted_string tut_abilities_info() } text << "."; } - text << ""; + text << ""; return formatted_string::parse_string(text.str(), false); } @@ -1651,14 +1674,14 @@ static std::string tut_target_mode(bool spells = false) "Once you're aiming at the correct monster, simply hit " "f, Enter or . to shoot at it. " "If you miss, "; - + if (spells) result += "Zap"; else result += "ff"; - + result += " fires at the same target again."; - + return (result); } @@ -1672,8 +1695,8 @@ static std::string tut_abilities() static std::string tut_throw_stuff(const item_def &item) { std::string result; - - result = "To do this, type t to throw, then "; + + result = "To do this, type f to fire, then "; result += item.slot; result += " for "; result += (item.quantity > 1 ? "these" : "this"); @@ -1689,7 +1712,7 @@ static std::string tut_throw_stuff(const item_def &item) void tutorial_describe_item(const item_def &item) { std::ostringstream ostr; - ostr << ""; + ostr << "<" << colour_to_str(channel_to_colour(MSGCH_TUTORIAL)) << ">"; switch (item.base_type) { case OBJ_WEAPONS: @@ -1702,7 +1725,7 @@ void tutorial_describe_item(const item_def &item) if (gives_ability(item) && wherey() <= get_number_of_lines() - 5) { ostr << "When wielded, some weapons (such as this one) " - "offer abilities that can be evoked. "; + "offer abilities that can be evoked. "; ostr << tut_abilities(); break; } // or if it grants a resistance @@ -1716,7 +1739,7 @@ void tutorial_describe_item(const item_def &item) } return; } - + item_def *weap = you.slot_item(EQ_WEAPON); bool wielded = (weap && (*weap).slot == item.slot); bool long_text = false; @@ -1726,10 +1749,10 @@ void tutorial_describe_item(const item_def &item) ostr << "You can wield this weapon with w, or use " "' to switch between the weapons in slot " "a and b. (Use = to adjust item slots.)"; - + // weapon skill used by this weapon and the best weapon skill int curr_wpskill, best_wpskill; - + // maybe this is a launching weapon if (is_range_weapon(item)) { @@ -1746,7 +1769,7 @@ void tutorial_describe_item(const item_def &item) if (you.skills[SK_UNARMED_COMBAT] > you.skills[best_wpskill]) best_wpskill = SK_UNARMED_COMBAT; } - + if (you.skills[curr_wpskill] + 2 < you.skills[best_wpskill]) { ostr << "\nOn second look you've been training in " @@ -1773,10 +1796,11 @@ void tutorial_describe_item(const item_def &item) ostr << "To attack a monster, you can simply walk into it."; } } + if (is_throwable(item, you.body_size()) && !long_text) { ostr << "\n\nSome weapons (including this one), can also be " - "thrown. "; + "fired. "; ostr << tut_throw_stuff(item); long_text = true; } @@ -1788,7 +1812,7 @@ void tutorial_describe_item(const item_def &item) << "enchantment or have special properties, good or bad. " << "The rarer the description, the greater the potential " << "value of an item."; - + Options.tutorial_events[TUT_SEEN_RANDART] = 0; } if (item_known_cursed( item ) && !long_text) @@ -1796,10 +1820,10 @@ void tutorial_describe_item(const item_def &item) ostr << "\n\nOnce wielded, a cursed weapon won't leave your hands " "again until the curse has been lifted by reading a " "scroll of remove curse or one of the enchantment scrolls."; - + if (!wielded && is_throwable(item, you.body_size())) ostr << " (Throwing it is safe, though.)"; - + Options.tutorial_events[TUT_YOU_CURSED] = 0; } Options.tutorial_events[TUT_SEEN_WEAPON] = 0; @@ -1809,7 +1833,7 @@ void tutorial_describe_item(const item_def &item) if ( is_throwable(item, player_size()) ) { ostr << item.name(DESC_CAP_YOUR) - << " can be thrown without the use of a launcher. "; + << " can be fired without the use of a launcher. "; ostr << tut_throw_stuff(item); } else if (is_launched(&you, you.weapon(), item)) @@ -1833,7 +1857,7 @@ void tutorial_describe_item(const item_def &item) } Options.tutorial_events[TUT_SEEN_MISSILES] = 0; break; - + case OBJ_ARMOUR: { bool wearable = true; @@ -1876,14 +1900,14 @@ void tutorial_describe_item(const item_def &item) } if (gives_resistance(item)) { - ostr << "\n\nThis armour offers its wearer protection from " - "certain sources. For an overview of your resistances " - "(among other things) type %."; + ostr << "\n\nThis armour offers its wearer protection from " + "certain sources. For an overview of your resistances " + "(among other things) type %."; } if (is_artefact(item) && gives_ability(item)) { ostr << "\nWhen worn, some types of armour (such as this one) " - "offer abilities that can be evoked. "; + "offer abilities that can be evoked. "; ostr << tut_abilities(); } Options.tutorial_events[TUT_SEEN_ARMOUR] = 0; @@ -1908,12 +1932,12 @@ void tutorial_describe_item(const item_def &item) } Options.tutorial_events[TUT_SEEN_FOOD] = 0; break; - + case OBJ_SCROLLS: ostr << "Type r to read this scroll. "; Options.tutorial_events[TUT_SEEN_SCROLL] = 0; break; - + case OBJ_JEWELLERY: { ostr << "Jewellery can be Put on or Removed " @@ -1936,8 +1960,8 @@ void tutorial_describe_item(const item_def &item) } if (gives_ability(item)) { - ostr << "\nWhen worn, some types of jewellery (such as this one) " - "offer abilities that can be evoked. "; + ostr << "\n\nWhen worn, some types of jewellery (such as this one) " + "offer abilities that can be evoked. "; ostr << tut_abilities(); } Options.tutorial_events[TUT_SEEN_JEWELLERY] = 0; @@ -1947,76 +1971,78 @@ void tutorial_describe_item(const item_def &item) ostr << "Use q to quaff this potion. "; Options.tutorial_events[TUT_SEEN_POTION] = 0; break; - + case OBJ_BOOKS: - if (!item_ident(item, ISFLAG_KNOW_TYPE)) + if (item.sub_type == BOOK_MANUAL) { - ostr << "It's a book, you can read it. "; + ostr << "A manual can greatly help you in training a skill. " + "To use it, read it while your experience " + "pool (the number in brackets) is full. Note that " + "this will drain said pool, so only use this manual " + "if you think you need the skill in question."; } - else + else // it's a spellbook { - if (item.sub_type == BOOK_MANUAL) + if (you.religion == GOD_TROG) + { + if (!item_ident(item, ISFLAG_KNOW_TYPE)) + ostr << "It's a book, you can read it."; + else + { + ostr << "A spellbook! You could Memorise some " + "spells and then cast them with z."; + } + ostr << "\nAs a worshipper of " + << god_name(GOD_TROG) + << ", though, you might instead wish to burn this " + "tome of hated magic by using the corresponding " + "ability. " + "Note that this only works on books that are " + "lying on the floor and not on your current " + "square. "; + } + else if (!item_ident(item, ISFLAG_KNOW_TYPE)) + { + ostr << "It's a book, you can read it."; + } + else if (!you.skills[SK_SPELLCASTING]) { - ostr << "A manual can greatly help you in training a skill. " - "To use it, read it while your experience " - "pool (the number in brackets) is full. Note that " - "this will drain said pool, so only use this manual " - "if you think you need the skill in question."; + ostr << "A spellbook! You could Memorise some " + "spells and then cast them with z. "; + + ostr << "\nFor now, however, that will have to wait " + "until you've learned the basics of Spellcasting " + "by reading lots of scrolls."; } - else // it's a spellbook + else // actually can cast spells { - if (you.religion == GOD_TROG) + if (player_can_memorise(item)) { - ostr << "A spellbook! You could Memorise some " - "spells and then cast them with Z. "; - ostr << "\nAs a worshipper of " - << god_name(GOD_TROG) - << ", though, you might instead wish to burn this " - "tome of hated magic by using the corresponding " - "ability. " - "Note that this only works on books that are " - "lying on the floor and not on your current " - "square. "; + ostr << "Such a highlighted spell " + "can be Memorised right away. "; } - else if (!you.skills[SK_SPELLCASTING]) + else { - ostr << "A spellbook! You could Memorise some " - "spells and then cast them with Z. "; - ostr << "\nFor now, however, that will have to wait " - "until you've learned the basics of Spellcasting " - "by reading lots of scrolls."; + ostr << "You cannot memorise any " + << (you.spell_no ? "more " : "") + << "spells right now. This will change as you " + "grow in levels and Spellcasting proficiency. "; } - else // actually can cast spells - { - if (player_can_memorise(item)) - { - ostr << "Such a highlighted spell " - "can be Memorised right away. "; - } - else - { - ostr << "You cannot memorise any " - << (you.spell_no ? "more " : "") - << "spells right now. This will change as you " - "grow in levels and Spellcasting proficiency. "; - } - if (you.spell_no) - { - ostr << "\n\nTo do magic, type Z and " - "choose a spell, e.g. a (check " - "with ?). For attack spells " - "you'll "; - ostr << tut_target_mode(true); - } + if (you.spell_no) + { + ostr << "\n\nTo do magic, type z and choose a " + "spell, e.g. a (check with ?). " + "For attack spells you'll "; + ostr << tut_target_mode(true); } } } Options.tutorial_events[TUT_SEEN_SPBOOK] = 0; break; - + case OBJ_CORPSES: - ostr << "Corpses lying on the floor can be Dissected " + ostr << "Corpses lying on the floor can be chopped up " "with a sharp implement to produce chunks for food " "(though they may not be healthy)"; @@ -2033,38 +2059,58 @@ void tutorial_describe_item(const item_def &item) "you might just as well drop this."; Options.tutorial_events[TUT_SEEN_CARRION] = 0; break; - + case OBJ_STAVES: - ostr << "Staffs have to be wielded to be of use. " - "There are staves that help spellcasters, and others that " - "allow you to harness spells hidden within."; - if (!item_ident(item, ISFLAG_KNOW_TYPE)) + if (item_is_rod( item )) { - ostr << "\n\nTo find out what this staff might do, you have to " - "wield it, then Evoke it to see if anything " - "interesting happens. If nothing happens, it's probably " - "an ancient staff capable of enhancing certain spell " - "schools while suppressing others. "; - if (you.spell_no) + if (!item_ident(item, ISFLAG_KNOW_TYPE)) { - ostr << "You can find out which one, by casting spells while " - "wielding this staff. Eventually, the staff might " - "react to a spell of its school and identify itself."; + ostr << "\n\nTo find out what this rod might do, you have to " + "wield and evoke it to see if you can " + "use the spells hidden within. "; + } + else + { + ostr << "\n\nYou can use this rod's magic by wielding " + "and evoking it."; } } - else if (item.sub_type <= STAFF_AIR && gives_resistance(item)) + else { - ostr << "\nThis staff offers its wielder protection from " - "certain sources. For an overview of your resistances " - "(among other things) type %."; - } + ostr << "This staff can enhance your spellcasting of specific " + "spell schools. "; + bool gives_resist = false; + if (you.spell_no && !item_ident(item, ISFLAG_KNOW_TYPE)) + { + ostr << "You can find out which one by casting spells while " + "wielding this staff. Eventually, the staff might " + "react to a spell of its school and identify itself."; + } + else if (gives_resistance(item)) + { + ostr << "It also offers its wielder protection from certain " + "sources. For an overview of your resistances (among " + "other things) type %."; + gives_resist = true; + } + + if (!gives_resist && Options.tutorial_type == TUT_BERSERK_CHAR + && you.religion == GOD_TROG) + { + ostr << "\n\nSeeing how " + << god_name(GOD_TROG, false) + << " frowns upon the use of magic, this staff will be " + "of little use to you and you might just as well " + "drop it now."; + } + } Options.tutorial_events[TUT_SEEN_STAFF] = 0; break; case OBJ_MISCELLANY: ostr << "Miscellanous items sometimes harbour magical powers. Try " - "wielding and Evoking it."; + "wielding and evoking it."; Options.tutorial_events[TUT_SEEN_MISC] = 0; break; @@ -2072,7 +2118,7 @@ void tutorial_describe_item(const item_def &item) return; } - ostr << ""; + ostr << ""; std::string broken = ostr.str(); linebreak_string2(broken, get_tutorial_cols()); cgotoxy(1, wherey() + 2); @@ -2110,7 +2156,7 @@ bool tutorial_feat_interesting(dungeon_feature_type feat) void tutorial_describe_feature(dungeon_feature_type feat) { std::ostringstream ostr; - ostr << "\n"; + ostr << "\n<" << colour_to_str(channel_to_colour(MSGCH_TUTORIAL)) << ">"; switch (feat) { @@ -2238,6 +2284,7 @@ void tutorial_describe_feature(dungeon_feature_type feat) else return; } + ostr << ""; std::string broken = ostr.str(); linebreak_string2(broken, get_tutorial_cols()); @@ -2265,7 +2312,7 @@ bool tutorial_monster_interesting(const monsters *mons) void tutorial_describe_monster(const monsters *mons) { std::ostringstream ostr; - ostr << "\n\n"; + ostr << "\n\n<" << colour_to_str(channel_to_colour(MSGCH_TUTORIAL)) << ">"; if (mons_is_unique(mons->type)) { @@ -2316,6 +2363,7 @@ void tutorial_describe_monster(const monsters *mons) << mons_pronoun((monster_type) mons->type, PRONOUN_NOCAP) << " has been distracted by something."; } + ostr << ""; std::string broken = ostr.str(); linebreak_string2(broken, get_tutorial_cols()); -- cgit v1.2.3-54-g00ecf