Give survival hints in tutorial death message.
[crawl.git] / crawl-ref / source / tutorial.cc
blob09053f6c7f9a36dd43f318d21c6a3a79ccde176d
1 /*
2 * File: tutorial.cc
3 * Summary: Collection of tutorial related functions.
4 */
6 #include "AppHdr.h"
8 #include "externs.h"
9 #include "maps.h"
10 #include "message.h"
11 #include "mpr.h"
12 #include "player.h"
13 #include "state.h"
14 #include "tutorial.h"
16 mapref_vector get_tutorial_maps()
18 return find_maps_for_tag("tutorial_start");
21 // We could save this in crawl_state instead.
22 // Or choose_game() could save *ng to crawl_state
23 // entirely, though that'd be redundant with
24 // you.your_name, you.species, crawl_state.type, ...
26 static std::string _tutorial_map;
28 std::string get_tutorial_map()
30 return _tutorial_map;
33 void set_tutorial_map(const std::string& map)
35 _tutorial_map = map;
38 void set_tutorial_hunger(int hunger)
40 if (!crawl_state.game_is_tutorial())
41 return;
43 you.hunger = hunger;
46 void tutorial_death_message()
48 mprnojoin("You die...");
49 mprnojoin("In Crawl, death is a sad but common occurence. "
50 "Note that there's usually something you could have done to "
51 "survive, for example by using some kind of item, running away, "
52 "resting between fights, or by avoiding combat entirely. "
53 "Keep trying, eventually you'll prevail!",
54 MSGCH_TUTORIAL);
55 more();