From b12baff21ddd117bc4ca6cf0e8abfa42ec53177b Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Thu, 14 Feb 2008 12:13:03 +0000 Subject: Fix 1893419: Add "kill neutral" to debugging list. Fix 1893422: Move tutorial just_triggered information at beginning of learned_something_new() etc. code. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3436 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/tutorial.cc | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) (limited to 'crawl-ref/source/tutorial.cc') diff --git a/crawl-ref/source/tutorial.cc b/crawl-ref/source/tutorial.cc index 59a8ddf374..060a6b73a6 100644 --- a/crawl-ref/source/tutorial.cc +++ b/crawl-ref/source/tutorial.cc @@ -747,6 +747,8 @@ void tutorial_dissection_reminder(bool healthy) learned_something_new(TUT_OFFER_CORPSE); else if (one_chance_in(8)) { + Options.tut_just_triggered = true; + std::string text; text += "If you don't want to eat it, consider Dissecting " "this corpse under prayer as a sacrifice to "; @@ -755,7 +757,6 @@ void tutorial_dissection_reminder(bool healthy) "you can reread this information."; print_formatted_paragraph(text, get_tutorial_cols(), MSGCH_TUTORIAL); - Options.tut_just_triggered = true; if (is_resting()) stop_running(); @@ -783,6 +784,8 @@ void tutorial_healing_reminder() if (Options.tut_just_triggered) return; + Options.tut_just_triggered = 1; + std::string text; text = "Remember to rest between fights and to enter unexplored " "terrain with full hitpoints and magic. For resting, " @@ -796,7 +799,6 @@ void tutorial_healing_reminder() "a."; } print_formatted_paragraph(text, get_tutorial_cols(), MSGCH_TUTORIAL); - Options.tut_just_triggered = 1; if (is_resting()) stop_running(); @@ -886,6 +888,10 @@ void tutorial_first_monster(const monsters &mon) noisy(1, mon.x, mon.y); viewwindow(true, false); } + + Options.tutorial_events[TUT_SEEN_MONSTER] = 0; + Options.tutorial_left--; + Options.tut_just_triggered = true; std::string text = "That "; #ifndef USE_TILE @@ -930,10 +936,6 @@ void tutorial_first_monster(const monsters &mon) "find an explanation of how to do this."; print_formatted_paragraph(text, get_tutorial_cols(), MSGCH_TUTORIAL); } - - Options.tutorial_events[TUT_SEEN_MONSTER] = 0; - Options.tutorial_left--; - Options.tut_just_triggered = 1; } void tutorial_first_item(const item_def &item) @@ -948,6 +950,10 @@ void tutorial_first_item(const item_def &item) if (mgrd[item.x][item.y] != NON_MONSTER) return; + Options.tutorial_events[TUT_SEEN_FIRST_OBJECT] = 0; + Options.tutorial_left--; + Options.tut_just_triggered = true; + std::string text = "That "; #ifndef USE_TILE unsigned ch; @@ -974,10 +980,6 @@ void tutorial_first_item(const item_def &item) "\nAny time you view an item, you can read about its " "properties and description."; print_formatted_paragraph(text, get_tutorial_cols(), MSGCH_TUTORIAL); - - Options.tutorial_events[TUT_SEEN_FIRST_OBJECT] = 0; - Options.tutorial_left--; - Options.tut_just_triggered = 1; } // Here most of the tutorial messages for various triggers are handled. @@ -1003,6 +1005,10 @@ void learned_something_new(tutorial_event_type seen_what, int x, int y) const coord_def ep = grid2view(coord_def(x,y)); #endif + Options.tut_just_triggered = true; + Options.tutorial_events[seen_what] = 0; + Options.tutorial_left--; + switch(seen_what) { case TUT_SEEN_POTION: @@ -1345,7 +1351,9 @@ void learned_something_new(tutorial_event_type seen_what, int x, int y) break; case TUT_YOU_SICK: + Options.tut_just_triggered = false; learned_something_new(TUT_YOU_ENCHANTED); + Options.tut_just_triggered = true; text << "Corpses can be spoiled or inedible, making you sick. " "Also, some monsters' flesh is less palatable than others'. " "While sick, your hitpoints won't regenerate and sometimes " @@ -1597,10 +1605,6 @@ void learned_something_new(tutorial_event_type seen_what, int x, int y) if (is_resting()) stop_running(); - - Options.tut_just_triggered = true; - Options.tutorial_events[seen_what] = 0; - Options.tutorial_left--; } formatted_string tut_abilities_info() -- cgit v1.2.3-54-g00ecf