From 45835f326479addd1bfdc2d3d5bd3e175f9319aa Mon Sep 17 00:00:00 2001 From: dshaligram Date: Fri, 9 Feb 2007 14:34:33 +0000 Subject: Tutorial messages and miscellaneous fixes (Johanna). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@948 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/acr.cc | 6 ++++-- crawl-ref/source/newgame.cc | 24 ++++++++++++------------ crawl-ref/source/spl-book.cc | 2 +- crawl-ref/source/tutorial.cc | 19 ++++++++++++++----- 4 files changed, 31 insertions(+), 20 deletions(-) (limited to 'crawl-ref/source') diff --git a/crawl-ref/source/acr.cc b/crawl-ref/source/acr.cc index e46740235e..74f591eb6b 100644 --- a/crawl-ref/source/acr.cc +++ b/crawl-ref/source/acr.cc @@ -301,6 +301,8 @@ int main( int argc, char *argv[] ) if (Options.tutorial_left) { + // don't allow triggering at game start + Options.tut_just_triggered = true; // print stats and everything prep_input(); char ch = 'x'; @@ -852,9 +854,9 @@ static void input() { if ( 2*you.hp < you.hp_max || 2*you.magic_points < you.max_magic_points ) tutorial_healing_reminder(); - else if (Options.tutorial_events[TUT_SHIFT_RUN] && you.num_turns >= 200) + else if (you.running < RMODE_REST_DURATION && Options.tutorial_events[TUT_SHIFT_RUN] && you.num_turns >= 200) learned_something_new(TUT_SHIFT_RUN); - else if (Options.tutorial_events[TUT_MAP_VIEW] && you.num_turns >= 500) + else if (you.running < RMODE_REST_DURATION && Options.tutorial_events[TUT_MAP_VIEW] && you.num_turns >= 500) learned_something_new(TUT_MAP_VIEW); } diff --git a/crawl-ref/source/newgame.cc b/crawl-ref/source/newgame.cc index a43f7ec5f9..435bbdf08e 100644 --- a/crawl-ref/source/newgame.cc +++ b/crawl-ref/source/newgame.cc @@ -1446,7 +1446,7 @@ static void choose_book( item_def& book, int firstbook, int numbooks ) } textcolor(BROWN); - cprintf(EOL "? - Random" ); + cprintf(EOL "* - Random" ); if ( Options.prev_book != SBT_NO_SELECTION ) { cprintf("; Enter - %s", @@ -1465,7 +1465,7 @@ static void choose_book( item_def& book, int firstbook, int numbooks ) textcolor( LIGHTGREY ); keyin = get_ch(); - } while (keyin != '?' && + } while (keyin != '*' && ((keyin != '\r' && keyin != '\n') || Options.prev_book == SBT_NO_SELECTION ) && (keyin < 'a' || keyin > ('a' + numbooks))); @@ -1473,18 +1473,18 @@ static void choose_book( item_def& book, int firstbook, int numbooks ) if ( keyin == '\r' || keyin == '\n' ) { if ( Options.prev_book == SBT_RANDOM ) - keyin = '?'; + keyin = '*'; else keyin = ('a' + Options.prev_book - 1); } } - if (Options.random_pick || Options.book == SBT_RANDOM || keyin == '?') + if (Options.random_pick || Options.book == SBT_RANDOM || keyin == '*') ng_book = SBT_RANDOM; else ng_book = keyin - 'a' + 1; - if ( Options.random_pick || keyin == '?' ) + if ( Options.random_pick || keyin == '*' ) keyin = random2(numbooks) + 'a'; book.sub_type = firstbook + keyin - 'a'; @@ -1546,7 +1546,7 @@ static void choose_weapon( void ) Options.prev_weapon = WPN_UNKNOWN; textcolor(BROWN); - cprintf(EOL "? - Random" ); + cprintf(EOL "* - Random" ); if (Options.prev_weapon != WPN_UNKNOWN) { char weapbuf[ITEMNAME_SIZE]; @@ -1566,7 +1566,7 @@ static void choose_weapon( void ) keyin = get_ch(); } - while (keyin != '?' && + while (keyin != '*' && ((keyin != '\r' && keyin != '\n') || Options.prev_weapon == WPN_UNKNOWN) && (keyin < 'a' || keyin > ('a' + num_choices))); @@ -1574,7 +1574,7 @@ static void choose_weapon( void ) if (keyin == '\r' || keyin == '\n') { if (Options.prev_weapon == WPN_RANDOM) - keyin = '?'; + keyin = '*'; else { for (int i = 0; i < num_choices; ++i) @@ -1583,14 +1583,14 @@ static void choose_weapon( void ) } } - if (keyin != '?' && effective_stat_bonus(startwep[keyin-'a']) > -4) + if (keyin != '*' && effective_stat_bonus(startwep[keyin-'a']) > -4) { cprintf(EOL "A fine choice. " EOL); delay(1000); } } - if (Options.random_pick || Options.weapon == WPN_RANDOM || keyin == '?') + if (Options.random_pick || Options.weapon == WPN_RANDOM || keyin == '*') { Options.weapon = WPN_RANDOM; // try to choose a decent weapon @@ -1607,7 +1607,7 @@ static void choose_weapon( void ) you.inv[0].sub_type = startwep[keyin-'a']; ng_weapon = (Options.random_pick || Options.weapon == WPN_RANDOM || - keyin == '?') + keyin == '*') ? WPN_RANDOM : you.inv[0].sub_type; } @@ -1946,7 +1946,7 @@ static void openingScreen(void) textcolor( YELLOW ); cprintf("Hello, welcome to " CRAWL " " VERSION "!"); textcolor( BROWN ); - cprintf(EOL "(c) Copyright 1997-2002 Linley Henzell"); + cprintf(EOL "(c) Copyright 1997-2002 Linley Henzell, 2002-2007 Crawl DevTeam"); cprintf(EOL "Please consult crawl_manual.txt for instructions and legal details." EOL); diff --git a/crawl-ref/source/spl-book.cc b/crawl-ref/source/spl-book.cc index b07cf9beb2..7c78879df0 100644 --- a/crawl-ref/source/spl-book.cc +++ b/crawl-ref/source/spl-book.cc @@ -1363,7 +1363,7 @@ bool learn_spell(void) "reading the book of Annihilations" ); } -#if WIZARD +#ifdef WIZARD if (!you.wizard) return (false); else if (!yesno("Memorise anyway?")) diff --git a/crawl-ref/source/tutorial.cc b/crawl-ref/source/tutorial.cc index c2557ef8d9..da9968c507 100644 --- a/crawl-ref/source/tutorial.cc +++ b/crawl-ref/source/tutorial.cc @@ -746,6 +746,8 @@ void tutorial_finished() void tutorial_prayer_reminder() { + if (Options.tut_just_triggered) + return; if (coinflip()) {// always would be too annoying snprintf(info, INFO_SIZE, "Remember to pray before battle, so as to dedicate your kills to %s. ", god_name(you.religion)); @@ -771,6 +773,8 @@ void tutorial_healing_reminder() learned_something_new(TUT_NEED_HEALING); else if (you.num_turns - Options.tut_last_healed >= 50 && !you.poison) { + if (Options.tut_just_triggered) + return; snprintf(info, INFO_SIZE, "Remember to rest between fights and to enter unexplored terrain with full"); mpr(info, MSGCH_TUTORIAL); snprintf(info, INFO_SIZE, "hitpoints and/or magic. To do this, press 5."); @@ -1004,6 +1008,7 @@ void learned_something_new(unsigned int seen_what, int x, int y) if (Options.tutorial_type == TUT_RANGER_CHAR) { + more(); snprintf(info, INFO_SIZE, "However, as a hunter you might want to deal with it using your bow. Do this"); mpr(info, MSGCH_TUTORIAL); snprintf(info, INFO_SIZE, "with the following keypresses: wbf+. Here, wb wields the bow, f fires"); @@ -1017,6 +1022,7 @@ void learned_something_new(unsigned int seen_what, int x, int y) } else if (Options.tutorial_type == TUT_MAGIC_CHAR) { + more(); snprintf(info, INFO_SIZE, "However, as a conjurer you might want to deal with it using magic. Do this"); mpr(info, MSGCH_TUTORIAL); snprintf(info, INFO_SIZE, "with the following key presses: Za+. Here, Za zaps the first spell you know,"); @@ -1059,8 +1065,10 @@ void learned_something_new(unsigned int seen_what, int x, int y) case TUT_SEEN_DOOR: snprintf(info, INFO_SIZE, "The %c is a closed door. You can open it by walking into it.", get_screen_glyph(x,y)); formatted_mpr(formatted_string::parse_string(info), MSGCH_TUTORIAL); - snprintf(info, INFO_SIZE, "Sometimes it is useful to close a door. Do so by pressing c, followed by the direction."); + snprintf(info, INFO_SIZE, "Sometimes it is useful to close a door. Do so by pressing c, followed by the"); formatted_mpr(formatted_string::parse_string(info), MSGCH_TUTORIAL); + snprintf(info, INFO_SIZE, "direction."); + mpr(info, MSGCH_TUTORIAL); break; case TUT_KILLED_MONSTER: snprintf(info, INFO_SIZE, "Congratulations, your character just gained some experience by killing this " @@ -1175,9 +1183,10 @@ void learned_something_new(unsigned int seen_what, int x, int y) mpr(info, MSGCH_TUTORIAL); break; case TUT_ROTTEN_FOOD: - snprintf(info, INFO_SIZE, "One or more of the chunks or corpses you carry has started to rot. Few races can digest these safely, so you might " - "just as well drop them now."); + snprintf(info, INFO_SIZE, "One or more of the chunks or corpses you carry has started to rot. Few races"); mpr(info, MSGCH_TUTORIAL); + snprintf(info, INFO_SIZE, "can digest these safely, so you might just as well drop them now."); + formatted_mpr(formatted_string::parse_string(info), MSGCH_TUTORIAL); if (you.religion == GOD_TROG || you.religion == GOD_MAKHLEB || you.religion == GOD_OKAWARU) { snprintf(info, INFO_SIZE, "Also, if it is a rotting corpse you carry now might be a good time to drop"); @@ -1200,9 +1209,9 @@ void learned_something_new(unsigned int seen_what, int x, int y) if (you.duration[DUR_PRAYER] && (you.religion == GOD_OKAWARU || you.religion == GOD_MAKHLEB || you.religion == GOD_TROG || you.religion == GOD_ELYVILON)) { - snprintf(info, INFO_SIZE, "Note that doing this while praying will instead sacrifice it to %s, ", god_name(you.religion)); + snprintf(info, INFO_SIZE, "Note that doing this while praying will instead sacrifice it to %s.", god_name(you.religion)); mpr(info, MSGCH_TUTORIAL); - snprintf(info, INFO_SIZE, "which a god may or may not like. (Type ^ to get a hint about that.)"); + snprintf(info, INFO_SIZE, "You can figure out your god's opinion about this with ^.)"); formatted_mpr(formatted_string::parse_string(info), MSGCH_TUTORIAL); } break; -- cgit v1.2.3-54-g00ecf