Apply the new ground_level method.
[crawl.git] / crawl-ref / source / hints.h
blob1792b039915e88cebd0ced94a8a00eec6e9946ed
1 /*
2 * File: hints.h
3 * Summary: Stuff needed for hints mode
4 * Written by: j-p-e-g
6 * Created on 2007-01-11.
7 */
9 #ifndef HINTS_H
10 #define HINTS_H
12 #include <string>
13 #include <vector>
14 #include <stdio.h>
15 #include <stdlib.h>
17 #include "externs.h"
18 #include "mon-info.h"
20 class formatted_string;
21 class writer;
22 class reader;
24 enum hints_types
26 HINT_BERSERK_CHAR,
27 HINT_MAGIC_CHAR,
28 HINT_RANGER_CHAR,
29 HINT_TYPES_NUM // 3
32 void save_hints(writer& outf);
33 void load_hints(reader& inf);
34 void init_hints_options(void);
36 enum hints_event_type
38 HINT_SEEN_FIRST_OBJECT,
39 // seen certain items
40 HINT_SEEN_POTION,
41 HINT_SEEN_SCROLL,
42 HINT_SEEN_WAND,
43 HINT_SEEN_SPBOOK,
44 HINT_SEEN_JEWELLERY,
45 HINT_SEEN_MISC,
46 HINT_SEEN_STAFF,
47 HINT_SEEN_WEAPON,
48 HINT_SEEN_MISSILES,
49 HINT_SEEN_ARMOUR,
50 HINT_SEEN_RANDART,
51 HINT_SEEN_FOOD,
52 HINT_SEEN_CARRION,
53 HINT_SEEN_GOLD,
54 // encountered dungeon features
55 HINT_SEEN_STAIRS,
56 HINT_SEEN_ESCAPE_HATCH,
57 HINT_SEEN_BRANCH,
58 HINT_SEEN_PORTAL,
59 HINT_SEEN_TRAP,
60 HINT_SEEN_ALTAR,
61 HINT_SEEN_SHOP,
62 HINT_SEEN_DOOR,
63 HINT_FOUND_SECRET_DOOR,
64 // other 'first events'
65 HINT_SEEN_MONSTER,
66 HINT_SEEN_ZERO_EXP_MON,
67 HINT_SEEN_TOADSTOOL,
68 HINT_MONSTER_BRAND,
69 HINT_MONSTER_FRIENDLY,
70 HINT_MONSTER_SHOUT,
71 HINT_MONSTER_LEFT_LOS,
72 HINT_KILLED_MONSTER,
73 HINT_NEW_LEVEL,
74 HINT_SKILL_RAISE,
75 HINT_GAINED_MAGICAL_SKILL,
76 HINT_GAINED_MELEE_SKILL,
77 HINT_GAINED_RANGED_SKILL,
78 HINT_CHOOSE_STAT,
79 HINT_MAKE_CHUNKS,
80 HINT_OFFER_CORPSE,
81 HINT_NEW_ABILITY_GOD,
82 HINT_NEW_ABILITY_MUT,
83 HINT_NEW_ABILITY_ITEM,
84 HINT_FLEEING_MONSTER,
85 HINT_ROTTEN_FOOD,
86 HINT_CONVERT,
87 HINT_GOD_DISPLEASED,
88 HINT_EXCOMMUNICATE,
89 HINT_SPELL_MISCAST,
90 HINT_SPELL_HUNGER,
91 HINT_GLOWING,
92 HINT_YOU_RESIST,
93 // status changes
94 HINT_YOU_ENCHANTED,
95 HINT_YOU_SICK,
96 HINT_YOU_POISON,
97 HINT_YOU_ROTTING,
98 HINT_YOU_CURSED,
99 HINT_YOU_HUNGRY,
100 HINT_YOU_STARVING,
101 HINT_YOU_MUTATED,
102 HINT_CAN_BERSERK,
103 HINT_POSTBERSERK,
104 HINT_CAUGHT_IN_NET,
105 HINT_YOU_SILENCE,
106 // warning
107 HINT_RUN_AWAY,
108 HINT_RETREAT_CASTER,
109 HINT_WIELD_WEAPON,
110 HINT_NEED_HEALING,
111 HINT_NEED_POISON_HEALING,
112 HINT_INVISIBLE_DANGER,
113 HINT_NEED_HEALING_INVIS,
114 HINT_ABYSS,
115 // interface
116 HINT_MULTI_PICKUP,
117 HINT_HEAVY_LOAD,
118 HINT_SHIFT_RUN,
119 HINT_MAP_VIEW,
120 HINT_AUTO_EXPLORE,
121 HINT_DONE_EXPLORE,
122 HINT_AUTO_EXCLUSION,
123 HINT_STAIR_BRAND,
124 HINT_HEAP_BRAND,
125 HINT_TRAP_BRAND,
126 HINT_LOAD_SAVED_GAME,
127 // for the tutorial
128 HINT_AUTOPICKUP_THROWN,
129 HINT_TARGET_NO_FOE,
130 HINT_REMOVED_CURSE,
131 HINT_ITEM_RESISTANCES,
132 HINT_LEVITATING,
133 HINT_INACCURACY,
134 HINT_HEALING_POTIONS,
135 HINT_GAINED_SPELLCASTING,
136 HINT_FUMBLING_SHALLOW_WATER,
137 HINT_EATING_ROTTEN_FOOD,
138 HINT_EVENTS_NUM
141 struct newgame_def;
142 void init_hints();
143 void tutorial_init_hints();
144 void pick_hints(newgame_def* choice);
145 void hints_load_game(void);
146 void print_hints_menu(unsigned int type);
147 void hints_zap_secret_doors(void);
149 formatted_string hints_starting_info2();
150 void hints_starting_screen(void);
151 void hints_new_turn();
152 void hints_death_screen(void);
153 void hints_finished(void);
155 void hints_dissection_reminder(bool healthy);
156 void hints_healing_check();
157 void hints_healing_reminder(void);
159 void taken_new_item(object_class_type item_type);
160 void hints_gained_new_skill(skill_type skill);
161 void hints_monster_seen(const monster& mon);
162 void hints_first_item(const item_def& item);
163 void learned_something_new(hints_event_type seen_what,
164 coord_def gc = coord_def());
165 formatted_string hints_abilities_info(void);
166 std::string hints_skills_info(void);
167 std::string hints_skills_description_info(void);
169 // Additional information for tutorial players.
170 void check_item_hint(const item_def &item, unsigned int num_old_talents);
171 void hints_describe_item(const item_def &item);
172 void hints_inscription_info(bool autoinscribe, std::string prompt);
173 bool hints_pos_interesting(int x, int y);
174 void hints_describe_pos(int x, int y);
175 bool hints_monster_interesting(const monster* mons);
176 void hints_describe_monster(const monster_info& mi, bool has_stat_desc);
178 void hints_observe_cell(const coord_def& gc);
180 struct hints_state
182 FixedVector<bool, HINT_EVENTS_NUM> hints_events;
183 bool hints_explored;
184 bool hints_stashes;
185 bool hints_travel;
186 unsigned int hints_spell_counter;
187 unsigned int hints_throw_counter;
188 unsigned int hints_berserk_counter;
189 unsigned int hints_melee_counter;
190 unsigned int hints_last_healed;
191 unsigned int hints_seen_invisible;
193 bool hints_just_triggered;
194 unsigned int hints_type;
197 extern hints_state Hints;
199 #endif