summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crawl-ref/source/abl-show.cc6
-rw-r--r--crawl-ref/source/command.cc8
-rw-r--r--crawl-ref/source/delay.cc18
-rw-r--r--crawl-ref/source/describe.cc22
-rw-r--r--crawl-ref/source/directn.cc6
-rw-r--r--crawl-ref/source/dungeon.cc2
-rw-r--r--crawl-ref/source/effects.cc4
-rw-r--r--crawl-ref/source/enum.h174
-rw-r--r--crawl-ref/source/exclude.cc4
-rw-r--r--crawl-ref/source/fight.cc8
-rw-r--r--crawl-ref/source/files.cc8
-rw-r--r--crawl-ref/source/food.cc10
-rw-r--r--crawl-ref/source/hints.cc (renamed from crawl-ref/source/tutorial.cc)1018
-rw-r--r--crawl-ref/source/hints.h89
-rw-r--r--crawl-ref/source/it_use2.cc10
-rw-r--r--crawl-ref/source/item_use.cc22
-rw-r--r--crawl-ref/source/items.cc16
-rw-r--r--crawl-ref/source/main.cc38
-rw-r--r--crawl-ref/source/makefile.obj2
-rw-r--r--crawl-ref/source/menu.cc2
-rw-r--r--crawl-ref/source/message.cc4
-rw-r--r--crawl-ref/source/misc.cc10
-rw-r--r--crawl-ref/source/mislead.cc4
-rw-r--r--crawl-ref/source/mon-act.cc8
-rw-r--r--crawl-ref/source/mon-behv.cc4
-rw-r--r--crawl-ref/source/mon-cast.cc2
-rw-r--r--crawl-ref/source/mon-stuff.cc16
-rw-r--r--crawl-ref/source/monster.cc4
-rw-r--r--crawl-ref/source/mutation.cc6
-rw-r--r--crawl-ref/source/newgame.cc2
-rw-r--r--crawl-ref/source/ouch.cc6
-rw-r--r--crawl-ref/source/player-stats.cc4
-rw-r--r--crawl-ref/source/player.cc26
-rw-r--r--crawl-ref/source/religion.cc10
-rw-r--r--crawl-ref/source/shout.cc6
-rw-r--r--crawl-ref/source/skills.cc6
-rw-r--r--crawl-ref/source/skills2.cc10
-rw-r--r--crawl-ref/source/spells4.cc4
-rw-r--r--crawl-ref/source/spl-cast.cc10
-rw-r--r--crawl-ref/source/stairs.cc6
-rw-r--r--crawl-ref/source/startup.cc8
-rw-r--r--crawl-ref/source/stash.cc4
-rw-r--r--crawl-ref/source/state.cc6
-rw-r--r--crawl-ref/source/stuff.cc4
-rw-r--r--crawl-ref/source/traps.cc4
-rw-r--r--crawl-ref/source/travel.cc14
-rw-r--r--crawl-ref/source/tutorial.h89
-rw-r--r--crawl-ref/source/view.cc6
48 files changed, 875 insertions, 875 deletions
diff --git a/crawl-ref/source/abl-show.cc b/crawl-ref/source/abl-show.cc
index a295911a11..72b692bb9d 100644
--- a/crawl-ref/source/abl-show.cc
+++ b/crawl-ref/source/abl-show.cc
@@ -54,7 +54,7 @@
#include "stuff.h"
#include "areas.h"
#include "transform.h"
-#include "tutorial.h"
+#include "hints.h"
#ifdef UNIX
#include "libunix.h"
@@ -2094,11 +2094,11 @@ int choose_ability_menu(const std::vector<talent>& talents)
abil_menu.set_flags(MF_SINGLESELECT | MF_ANYPRINTABLE
| MF_ALWAYS_SHOW_MORE);
- if (Tutorial.tutorial_left)
+ if (Hints.hints_left)
{
// XXX: This could be buggy if you manage to pick up lots and
// lots of abilities during the tutorial.
- abil_menu.set_more(tut_abilities_info());
+ abil_menu.set_more(hints_abilities_info());
}
else
{
diff --git a/crawl-ref/source/command.cc b/crawl-ref/source/command.cc
index c6f08e2a20..68cc65ae23 100644
--- a/crawl-ref/source/command.cc
+++ b/crawl-ref/source/command.cc
@@ -51,7 +51,7 @@
#include "env.h"
#include "terrain.h"
#include "transform.h"
-#include "tutorial.h"
+#include "hints.h"
#include "view.h"
#include "viewchar.h"
@@ -2507,7 +2507,7 @@ static void _add_formatted_keyhelp(column_composer &cols)
false, true, _cmdhelp_textfilter);
}
-static void _add_formatted_tutorial_help(column_composer &cols)
+static void _add_formatted_hints_help(column_composer &cols)
{
cols.add_formatted(
0, "<h>Item types (and common commands)\n",
@@ -2616,8 +2616,8 @@ void list_commands(int hotkey, bool do_redraw_screen)
// Page size is number of lines - one line for --more-- prompt.
cols.set_pagesize(get_number_of_lines() - 1);
- if (Tutorial.tutorial_left)
- _add_formatted_tutorial_help(cols);
+ if (Hints.hints_left)
+ _add_formatted_hints_help(cols);
else
_add_formatted_keyhelp(cols);
diff --git a/crawl-ref/source/delay.cc b/crawl-ref/source/delay.cc
index a3c0482e87..738e2e4864 100644
--- a/crawl-ref/source/delay.cc
+++ b/crawl-ref/source/delay.cc
@@ -58,7 +58,7 @@
#include "env.h"
#include "transform.h"
#include "travel.h"
-#include "tutorial.h"
+#include "hints.h"
#include "view.h"
#include "xom.h"
@@ -1427,8 +1427,8 @@ static void _armour_wear_effects(const int item_slot)
equip_item(eq_slot, item_slot);
- if (Tutorial.tutorial_left && your_talents(false).size() > old_talents)
- learned_something_new(TUT_NEW_ABILITY_ITEM);
+ if (Hints.hints_left && your_talents(false).size() > old_talents)
+ learned_something_new(HINT_NEW_ABILITY_ITEM);
}
void equip_armour_effect(item_def& arm, bool unmeld)
@@ -1538,7 +1538,7 @@ void equip_armour_effect(item_def& arm, bool unmeld)
if (arm.cursed() && !unmeld)
{
mpr("Oops, that feels deathly cold.");
- learned_something_new(TUT_YOU_CURSED);
+ learned_something_new(HINT_YOU_CURSED);
if (!known_cursed)
{
@@ -1869,8 +1869,8 @@ inline static void _monster_warning(activity_interrupt_type ai,
const_cast<monsters*>(mon)->seen_context = "just seen";
}
- if (Tutorial.tutorial_left)
- tutorial_monster_seen(*mon);
+ if (Hints.hints_left)
+ hints_monster_seen(*mon);
}
// Turns autopickup off if we ran into an invisible monster or saw a monster
@@ -1888,10 +1888,10 @@ void autotoggle_autopickup(bool off)
"Deactivating autopickup; reactivate with <w>%s</w>.",
command_to_string(CMD_TOGGLE_AUTOPICKUP).c_str());
}
- if (Tutorial.tutorial_left)
+ if (Hints.hints_left)
{
- learned_something_new(TUT_INVISIBLE_DANGER);
- Tutorial.tut_seen_invisible = you.num_turns;
+ learned_something_new(HINT_INVISIBLE_DANGER);
+ Hints.hints_seen_invisible = you.num_turns;
}
}
else if (Options.autopickup_on < 0) // was turned off automatically
diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc
index d81e46a3b8..7fbd6be1ac 100644
--- a/crawl-ref/source/describe.cc
+++ b/crawl-ref/source/describe.cc
@@ -54,7 +54,7 @@
#include "spl-cast.h"
#include "spl-util.h"
#include "transform.h"
-#include "tutorial.h"
+#include "hints.h"
#include "xom.h"
#define LONG_DESC_KEY "long_desc_key"
@@ -2184,8 +2184,8 @@ void describe_feature_wide(const coord_def& pos)
mouse_control mc(MOUSE_MODE_MORE);
- if (Tutorial.tutorial_left)
- tutorial_describe_pos(pos.x, pos.y);
+ if (Hints.hints_left)
+ hints_describe_pos(pos.x, pos.y);
if (getchm() == 0)
getchm();
@@ -2234,7 +2234,7 @@ void get_item_desc(const item_def &item, describe_info &inf, bool terse)
// so we can actually output these spells if space is scarce.
const bool verbose = !terse || !item.has_spells();
inf.body << get_item_description(item, verbose, false,
- Tutorial.tutorial_left);
+ Hints.hints_left);
}
// Returns true if spells can be shown to player.
@@ -2244,7 +2244,7 @@ static bool _show_item_description(const item_def &item)
const int height = get_number_of_lines();
std::string desc =
- get_item_description(item, true, false, Tutorial.tutorial_left);
+ get_item_description(item, true, false, Hints.hints_left);
int num_lines = count_desc_lines(desc, lineWidth) + 1;
@@ -2256,8 +2256,8 @@ static bool _show_item_description(const item_def &item)
desc = get_item_description(item, 1, false, true);
print_description(desc);
- if (Tutorial.tutorial_left)
- tutorial_describe_item(item);
+ if (Hints.hints_left)
+ hints_describe_item(item);
if (item.has_spells())
{
@@ -2428,8 +2428,8 @@ void inscribe_item(item_def &item, bool msgwin)
prompt = "<cyan>" + prompt + "</cyan>";
formatted_string::parse_string(prompt).display();
- if (Tutorial.tutorial_left && wherey() <= get_number_of_lines() - 5)
- tutorial_inscription_info(need_autoinscribe, prompt);
+ if (Hints.hints_left && wherey() <= get_number_of_lines() - 5)
+ hints_inscription_info(need_autoinscribe, prompt);
}
did_prompt = true;
}
@@ -3129,8 +3129,8 @@ void describe_monsters(const monsters& mons, bool force_seen)
// TODO enne - this should really move into get_monster_db_desc
// and an additional tutorial string added to describe_info.
- if (Tutorial.tutorial_left)
- tutorial_describe_monster(&mons, has_stat_desc);
+ if (Hints.hints_left)
+ hints_describe_monster(&mons, has_stat_desc);
if (getchm() == 0)
getchm();
diff --git a/crawl-ref/source/directn.cc b/crawl-ref/source/directn.cc
index c8639a1066..c6113144ad 100644
--- a/crawl-ref/source/directn.cc
+++ b/crawl-ref/source/directn.cc
@@ -62,7 +62,7 @@
#include "terrain.h"
#include "traps.h"
#include "travel.h"
-#include "tutorial.h"
+#include "hints.h"
#include "view.h"
#include "viewchar.h"
#include "viewgeom.h"
@@ -3886,7 +3886,7 @@ static void _describe_cell(const coord_def& where, bool in_range)
#if defined(DEBUG_DIAGNOSTICS) && defined(WIZARD)
debug_stethoscope(mgrd(where));
#endif
- if (Tutorial.tutorial_left && tutorial_monster_interesting(mon))
+ if (Hints.hints_left && hints_monster_interesting(mon))
{
std::string msg;
#ifdef USE_TILE
@@ -3953,7 +3953,7 @@ static void _describe_cell(const coord_def& where, bool in_range)
height_desc.c_str());
#else
const bool bloody = is_bloodcovered(where);
- if (Tutorial.tutorial_left && tutorial_pos_interesting(where.x, where.y))
+ if (Hints.hints_left && hints_pos_interesting(where.x, where.y))
{
#ifdef USE_TILE
feature_desc += " (<w>Right-click</w> for more information.)";
diff --git a/crawl-ref/source/dungeon.cc b/crawl-ref/source/dungeon.cc
index 96d451e283..e65a10fa59 100644
--- a/crawl-ref/source/dungeon.cc
+++ b/crawl-ref/source/dungeon.cc
@@ -66,7 +66,7 @@
#include "terrain.h"
#include "traps.h"
#include "travel.h"
-#include "tutorial.h"
+#include "hints.h"
#ifdef DEBUG_DIAGNOSTICS
#define DEBUG_TEMPLES
diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc
index dc9168603f..2b92302214 100644
--- a/crawl-ref/source/effects.cc
+++ b/crawl-ref/source/effects.cc
@@ -73,7 +73,7 @@
#include "terrain.h"
#include "traps.h"
#include "travel.h"
-#include "tutorial.h"
+#include "hints.h"
#include "view.h"
#include "shout.h"
#include "viewchar.h"
@@ -3632,7 +3632,7 @@ static void _rot_inventory_food(long time_delta)
else if (!msg.empty())
mpr(msg.c_str(), MSGCH_ROTTEN_MEAT);
- learned_something_new(TUT_ROTTEN_FOOD);
+ learned_something_new(HINT_ROTTEN_FOOD);
}
if (burden_changed_by_rot)
diff --git a/crawl-ref/source/enum.h b/crawl-ref/source/enum.h
index 5f1214365b..91eb5f3f2e 100644
--- a/crawl-ref/source/enum.h
+++ b/crawl-ref/source/enum.h
@@ -3035,100 +3035,100 @@ enum trap_type // env.trap_type[]
// Any change in this list warrants an increase in the version number in
// tutorial.cc.
-enum tutorial_event_type
+enum hints_event_type
{
- TUT_SEEN_FIRST_OBJECT,
+ HINT_SEEN_FIRST_OBJECT,
// seen certain items
- TUT_SEEN_POTION,
- TUT_SEEN_SCROLL,
- TUT_SEEN_WAND,
- TUT_SEEN_SPBOOK,
- TUT_SEEN_JEWELLERY,
- TUT_SEEN_MISC,
- TUT_SEEN_STAFF,
- TUT_SEEN_WEAPON,
- TUT_SEEN_MISSILES,
- TUT_SEEN_ARMOUR,
- TUT_SEEN_RANDART,
- TUT_SEEN_FOOD,
- TUT_SEEN_CARRION,
- TUT_SEEN_GOLD,
+ HINT_SEEN_POTION,
+ HINT_SEEN_SCROLL,
+ HINT_SEEN_WAND,
+ HINT_SEEN_SPBOOK,
+ HINT_SEEN_JEWELLERY,
+ HINT_SEEN_MISC,
+ HINT_SEEN_STAFF,
+ HINT_SEEN_WEAPON,
+ HINT_SEEN_MISSILES,
+ HINT_SEEN_ARMOUR,
+ HINT_SEEN_RANDART,
+ HINT_SEEN_FOOD,
+ HINT_SEEN_CARRION,
+ HINT_SEEN_GOLD,
// encountered dungeon features
- TUT_SEEN_STAIRS,
- TUT_SEEN_ESCAPE_HATCH,
- TUT_SEEN_BRANCH,
- TUT_SEEN_PORTAL,
- TUT_SEEN_TRAP,
- TUT_SEEN_ALTAR,
- TUT_SEEN_SHOP,
- TUT_SEEN_DOOR,
- TUT_FOUND_SECRET_DOOR,
+ HINT_SEEN_STAIRS,
+ HINT_SEEN_ESCAPE_HATCH,
+ HINT_SEEN_BRANCH,
+ HINT_SEEN_PORTAL,
+ HINT_SEEN_TRAP,
+ HINT_SEEN_ALTAR,
+ HINT_SEEN_SHOP,
+ HINT_SEEN_DOOR,
+ HINT_FOUND_SECRET_DOOR,
// other 'first events'
- TUT_SEEN_MONSTER,
- TUT_SEEN_ZERO_EXP_MON,
- TUT_SEEN_TOADSTOOL,
- TUT_MONSTER_BRAND,
- TUT_MONSTER_FRIENDLY,
- TUT_MONSTER_SHOUT,
- TUT_MONSTER_LEFT_LOS,
- TUT_KILLED_MONSTER,
- TUT_NEW_LEVEL,
- TUT_SKILL_RAISE,
- TUT_GAINED_MAGICAL_SKILL,
- TUT_GAINED_MELEE_SKILL,
- TUT_GAINED_RANGED_SKILL,
- TUT_CHOOSE_STAT,
- TUT_MAKE_CHUNKS,
- TUT_OFFER_CORPSE,
- TUT_NEW_ABILITY_GOD,
- TUT_NEW_ABILITY_MUT,
- TUT_NEW_ABILITY_ITEM,
- TUT_FLEEING_MONSTER,
- TUT_ROTTEN_FOOD,
- TUT_CONVERT,
- TUT_GOD_DISPLEASED,
- TUT_EXCOMMUNICATE,
- TUT_SPELL_MISCAST,
- TUT_SPELL_HUNGER,
- TUT_GLOWING,
- TUT_YOU_RESIST,
+ HINT_SEEN_MONSTER,
+ HINT_SEEN_ZERO_EXP_MON,
+ HINT_SEEN_TOADSTOOL,
+ HINT_MONSTER_BRAND,
+ HINT_MONSTER_FRIENDLY,
+ HINT_MONSTER_SHOUT,
+ HINT_MONSTER_LEFT_LOS,
+ HINT_KILLED_MONSTER,
+ HINT_NEW_LEVEL,
+ HINT_SKILL_RAISE,
+ HINT_GAINED_MAGICAL_SKILL,
+ HINT_GAINED_MELEE_SKILL,
+ HINT_GAINED_RANGED_SKILL,
+ HINT_CHOOSE_STAT,
+ HINT_MAKE_CHUNKS,
+ HINT_OFFER_CORPSE,
+ HINT_NEW_ABILITY_GOD,
+ HINT_NEW_ABILITY_MUT,
+ HINT_NEW_ABILITY_ITEM,
+ HINT_FLEEING_MONSTER,
+ HINT_ROTTEN_FOOD,
+ HINT_CONVERT,
+ HINT_GOD_DISPLEASED,
+ HINT_EXCOMMUNICATE,
+ HINT_SPELL_MISCAST,
+ HINT_SPELL_HUNGER,
+ HINT_GLOWING,
+ HINT_YOU_RESIST,
// status changes
- TUT_YOU_ENCHANTED,
- TUT_YOU_SICK,
- TUT_YOU_POISON,
- TUT_YOU_ROTTING,
- TUT_YOU_CURSED,
- TUT_YOU_HUNGRY,
- TUT_YOU_STARVING,
- TUT_YOU_MUTATED,
- TUT_CAN_BERSERK,
- TUT_POSTBERSERK,
- TUT_CAUGHT_IN_NET,
- TUT_YOU_SILENCE,
+ HINT_YOU_ENCHANTED,
+ HINT_YOU_SICK,
+ HINT_YOU_POISON,
+ HINT_YOU_ROTTING,
+ HINT_YOU_CURSED,
+ HINT_YOU_HUNGRY,
+ HINT_YOU_STARVING,
+ HINT_YOU_MUTATED,
+ HINT_CAN_BERSERK,
+ HINT_POSTBERSERK,
+ HINT_CAUGHT_IN_NET,
+ HINT_YOU_SILENCE,
// warning
- TUT_RUN_AWAY,
- TUT_RETREAT_CASTER,
- TUT_WIELD_WEAPON,
- TUT_NEED_HEALING,
- TUT_NEED_POISON_HEALING,
- TUT_INVISIBLE_DANGER,
- TUT_NEED_HEALING_INVIS,
- TUT_ABYSS,
+ HINT_RUN_AWAY,
+ HINT_RETREAT_CASTER,
+ HINT_WIELD_WEAPON,
+ HINT_NEED_HEALING,
+ HINT_NEED_POISON_HEALING,
+ HINT_INVISIBLE_DANGER,
+ HINT_NEED_HEALING_INVIS,
+ HINT_ABYSS,
// interface
- TUT_MULTI_PICKUP,
- TUT_HEAVY_LOAD,
- TUT_SHIFT_RUN,
- TUT_MAP_VIEW,
- TUT_AUTO_EXPLORE,
- TUT_DONE_EXPLORE,
- TUT_AUTO_EXCLUSION,
- TUT_STAIR_BRAND,
- TUT_HEAP_BRAND,
- TUT_TRAP_BRAND,
- TUT_LOAD_SAVED_GAME,
- TUT_EVENTS_NUM // 82
-};
-// NOTE: For numbers higher than 85 change size of tutorial_events in externs.h.
+ HINT_MULTI_PICKUP,
+ HINT_HEAVY_LOAD,
+ HINT_SHIFT_RUN,
+ HINT_MAP_VIEW,
+ HINT_AUTO_EXPLORE,
+ HINT_DONE_EXPLORE,
+ HINT_AUTO_EXCLUSION,
+ HINT_STAIR_BRAND,
+ HINT_HEAP_BRAND,
+ HINT_TRAP_BRAND,
+ HINT_LOAD_SAVED_GAME,
+ HINT_EVENTS_NUM // 82
+};
+// NOTE: For numbers higher than 85 change size of hints_events in externs.h.
enum undead_state_type // you.is_undead
{
diff --git a/crawl-ref/source/exclude.cc b/crawl-ref/source/exclude.cc
index 87368733dd..52a3bba46c 100644
--- a/crawl-ref/source/exclude.cc
+++ b/crawl-ref/source/exclude.cc
@@ -22,7 +22,7 @@
#include "tags.h"
#include "terrain.h"
#include "travel.h"
-#include "tutorial.h"
+#include "hints.h"
#include "view.h"
static bool _mon_needs_auto_exclude(const monsters *mon, bool sleepy = false)
@@ -77,7 +77,7 @@ void set_auto_exclude(const monsters *mon)
#ifdef USE_TILE
viewwindow(false);
#endif
- learned_something_new(TUT_AUTO_EXCLUSION, mon->pos());
+ learned_something_new(HINT_AUTO_EXCLUSION, mon->pos());
}
}
diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc
index 03399fb0ab..c24e481bca 100644
--- a/crawl-ref/source/fight.cc
+++ b/crawl-ref/source/fight.cc
@@ -68,7 +68,7 @@
#include "transform.h"
#include "traps.h"
#include "travel.h"
-#include "tutorial.h"
+#include "hints.h"
#include "view.h"
#include "shout.h"
#include "xom.h"
@@ -802,8 +802,8 @@ bool melee_attack::player_attack()
if (player_hits_monster())
{
did_hit = true;
- if (Tutorial.tutorial_left)
- Tutorial.tut_melee_counter++;
+ if (Hints.hints_left)
+ Hints.hints_melee_counter++;
const bool shield_blocked = attack_shield_blocked(true);
@@ -5792,7 +5792,7 @@ bool wielded_weapon_check(item_def *weapon, bool no_message)
const bool result = yesno(prompt.c_str(), true, 'n');
- learned_something_new(TUT_WIELD_WEAPON); // for tutorial Rangers
+ learned_something_new(HINT_WIELD_WEAPON); // for tutorial Rangers
// Don't warn again if you decide to continue your attack.
if (result)
diff --git a/crawl-ref/source/files.cc b/crawl-ref/source/files.cc
index a757f7a400..2de6d77244 100644
--- a/crawl-ref/source/files.cc
+++ b/crawl-ref/source/files.cc
@@ -82,7 +82,7 @@
#endif
#include "terrain.h"
#include "travel.h"
-#include "tutorial.h"
+#include "hints.h"
#include "view.h"
#include "viewgeom.h"
@@ -1789,14 +1789,14 @@ static void _save_game_base()
}
/* tutorial */
- if (Tutorial.tutorial_left)
+ if (Hints.hints_left)
{
std::string tutorFile = get_savedir_filename(you.your_name, "", "tut");
FILE *tutorf = fopen(tutorFile.c_str(), "wb");
if (tutorf)
{
writer outf(tutorf);
- save_tutorial(outf);
+ save_hints(outf);
fclose(tutorf);
DO_CHMOD_PRIVATE(tutorFile.c_str());
}
@@ -2192,7 +2192,7 @@ void restore_game(const std::string& name)
if (tutorf)
{
reader inf(tutorf, minorVersion);
- load_tutorial(inf);
+ load_hints(inf);
fclose(tutorf);
}
diff --git a/crawl-ref/source/food.cc b/crawl-ref/source/food.cc
index 21b8470ef0..66a964d831 100644
--- a/crawl-ref/source/food.cc
+++ b/crawl-ref/source/food.cc
@@ -49,7 +49,7 @@
#include "stuff.h"
#include "transform.h"
#include "travel.h"
-#include "tutorial.h"
+#include "hints.h"
#include "xom.h"
static corpse_effect_type _determine_chunk_effect(corpse_effect_type chunktype,
@@ -256,7 +256,7 @@ static bool _find_butchering_implement(int &butcher_tool)
if (!potential_candidate)
{
mpr("You don't carry any weapon you could use for butchering.");
- if (Tutorial.tutorial_left)
+ if (Hints.hints_left)
{
mpr("You should pick up the first knife, dagger, sword or axe "
"you find so you can use it to butcher corpses.",
@@ -960,7 +960,7 @@ bool food_change(bool suppress_message)
xom_is_stimulated(64);
}
- learned_something_new(TUT_YOU_STARVING);
+ learned_something_new(HINT_YOU_STARVING);
you.check_awaken(500);
break;
@@ -972,7 +972,7 @@ bool food_change(bool suppress_message)
mprf(MSGCH_FOOD, less_hungry, "%s", msg.c_str());
- learned_something_new(TUT_YOU_HUNGRY);
+ learned_something_new(HINT_YOU_HUNGRY);
break;
case HS_VERY_HUNGRY:
@@ -985,7 +985,7 @@ bool food_change(bool suppress_message)
mprf(MSGCH_FOOD, less_hungry, "%s", msg.c_str());
- learned_something_new(TUT_YOU_HUNGRY);
+ learned_something_new(HINT_YOU_HUNGRY);
break;
default:
diff --git a/crawl-ref/source/tutorial.cc b/crawl-ref/source/hints.cc
index 6ca214a618..aaa7bd3366 100644
--- a/crawl-ref/source/tutorial.cc
+++ b/crawl-ref/source/hints.cc
@@ -1,6 +1,6 @@
/*
- * File: tutorial.cc
- * Summary: A tutorial mode as an introduction on how to play Dungeon Crawl.
+ * File: hints.cc
+ * Summary: A hints mode as an introduction on how to play Dungeon Crawl.
* Written by: j-p-e-g
*
* Created on 2007-01-11.
@@ -13,7 +13,7 @@
#include <cstring>
#include <sstream>
-#include "tutorial.h"
+#include "hints.h"
#include "abl-show.h"
#include "artefact.h"
@@ -64,18 +64,18 @@
#include "viewchar.h"
#include "viewgeom.h"
-static species_type _get_tutorial_species(unsigned int type);
-static job_type _get_tutorial_job(unsigned int type);
-static bool _tutorial_feat_interesting(dungeon_feature_type feat);
-static void _tutorial_describe_disturbance(int x, int y);
-static void _tutorial_describe_cloud(int x, int y);
-static void _tutorial_describe_feature(int x, int y);
+static species_type _get_hints_species(unsigned int type);
+static job_type _get_hints_job(unsigned int type);
+static bool _hints_feat_interesting(dungeon_feature_type feat);
+static void _hints_describe_disturbance(int x, int y);
+static void _hints_describe_cloud(int x, int y);
+static void _hints_describe_feature(int x, int y);
static bool _water_is_disturbed(int x, int y);
//#define TUTORIAL_DEBUG
-#define TUTORIAL_VERSION 11
+#define HINTS_VERSION 11
-static int _get_tutorial_cols()
+static int _get_hints_cols()
{
#ifdef USE_TILE
return crawl_view.msgsz.x;
@@ -85,36 +85,36 @@ static int _get_tutorial_cols()
#endif
}
-tutorial_state Tutorial;
+hints_state Hints;
-void save_tutorial(writer& outf)
+void save_hints(writer& outf)
{
- marshallLong( outf, TUTORIAL_VERSION);
- marshallShort( outf, Tutorial.tutorial_type);
- for (long i = 0; i < TUT_EVENTS_NUM; ++i)
- marshallBoolean( outf, Tutorial.tutorial_events[i] );
+ marshallLong( outf, HINTS_VERSION);
+ marshallShort( outf, Hints.hints_type);
+ for (long i = 0; i < HINT_EVENTS_NUM; ++i)
+ marshallBoolean( outf, Hints.hints_events[i] );
}
-void load_tutorial(reader& inf)
+void load_hints(reader& inf)
{
- Tutorial.tutorial_left = 0;
+ Hints.hints_left = 0;
int version = unmarshallLong(inf);
- if (version != TUTORIAL_VERSION)
+ if (version != HINTS_VERSION)
return;
- Tutorial.tutorial_type = unmarshallShort(inf);
- for (long i = 0; i < TUT_EVENTS_NUM; ++i)
+ Hints.hints_type = unmarshallShort(inf);
+ for (long i = 0; i < HINT_EVENTS_NUM; ++i)
{
- Tutorial.tutorial_events[i] = unmarshallBoolean(inf);
- Tutorial.tutorial_left += Tutorial.tutorial_events[i];
+ Hints.hints_events[i] = unmarshallBoolean(inf);
+ Hints.hints_left += Hints.hints_events[i];
}
}
// Override init file definition for some options.
-void init_tutorial_options()
+void init_hints_options()
{
- if (!Tutorial.tutorial_left)
+ if (!Hints.hints_left)
return;
// Clear possible debug messages before messing
@@ -131,7 +131,7 @@ void init_tutorial_options()
}
// Tutorial selection screen and choice.
-bool pick_tutorial()
+bool pick_hints()
{
clrscr();
@@ -144,8 +144,8 @@ bool pick_tutorial()
textcolor( LIGHTGREY );
- for (int i = 0; i < TUT_TYPES_NUM; i++)
- print_tutorial_menu(i);
+ for (int i = 0; i < HINT_TYPES_NUM; i++)
+ print_hints_menu(i);
formatted_string::parse_string(
"\n"
@@ -160,41 +160,41 @@ bool pick_tutorial()
// Random choice.
if (keyn == '*' || keyn == '+' || keyn == '!' || keyn == '#')
- keyn = 'a' + random2(TUT_TYPES_NUM);
+ keyn = 'a' + random2(HINT_TYPES_NUM);
// Choose character for tutorial game and set starting values.
- if (keyn >= 'a' && keyn <= 'a' + TUT_TYPES_NUM - 1)
+ if (keyn >= 'a' && keyn <= 'a' + HINT_TYPES_NUM - 1)
{
- Tutorial.tutorial_type = keyn - 'a';
- you.species = _get_tutorial_species(Tutorial.tutorial_type);
- you.char_class = _get_tutorial_job(Tutorial.tutorial_type);
+ Hints.hints_type = keyn - 'a';
+ you.species = _get_hints_species(Hints.hints_type);
+ you.char_class = _get_hints_job(Hints.hints_type);
// Activate all triggers.
// This is rather backwards: If (true) an event still needs to be
// triggered, if (false) the relevant message was already printed.
- Tutorial.tutorial_events.init(true);
- Tutorial.tutorial_left = TUT_EVENTS_NUM;
+ Hints.hints_events.init(true);
+ Hints.hints_left = HINT_EVENTS_NUM;
// Used to compare which fighting means was used most often.
// XXX: This gets reset with every save, which seems odd.
// On the other hand, it's precisely between saves that
// players are most likely to forget these.
- Tutorial.tut_spell_counter = 0;
- Tutorial.tut_throw_counter = 0;
- Tutorial.tut_melee_counter = 0;
- Tutorial.tut_berserk_counter = 0;
+ Hints.hints_spell_counter = 0;
+ Hints.hints_throw_counter = 0;
+ Hints.hints_melee_counter = 0;
+ Hints.hints_berserk_counter = 0;
// Store whether explore, stash search or travelling was used.
// XXX: Also not stored across save games.
- Tutorial.tut_explored = true;
- Tutorial.tut_stashes = true;
- Tutorial.tut_travel = true;
+ Hints.hints_explored = true;
+ Hints.hints_stashes = true;
+ Hints.hints_travel = true;
// For occasional healing reminders.
- Tutorial.tut_last_healed = 0;
+ Hints.hints_last_healed = 0;
// Did the player recently see a monster turn invisible?
- Tutorial.tut_seen_invisible = 0;
+ Hints.hints_seen_invisible = 0;
Options.game.fully_random = false;
Options.game.book = SBT_RANDOM;
@@ -230,33 +230,33 @@ bool pick_tutorial()
return (false);
}
-void tutorial_load_game()
+void hints_load_game()
{
- if (!Tutorial.tutorial_left)
+ if (!Hints.hints_left)
return;
- learned_something_new(TUT_LOAD_SAVED_GAME);
+ learned_something_new(HINT_LOAD_SAVED_GAME);
// Reinitialise counters for explore, stash search and travelling.
- Tutorial.tut_explored = Tutorial.tutorial_events[TUT_AUTO_EXPLORE];
- Tutorial.tut_stashes = true;
- Tutorial.tut_travel = true;
+ Hints.hints_explored = Hints.hints_events[HINT_AUTO_EXPLORE];
+ Hints.hints_stashes = true;
+ Hints.hints_travel = true;
}
-void print_tutorial_menu(unsigned int type)
+void print_hints_menu(unsigned int type)
{
char letter = 'a' + type;
char desc[100];
switch (type)
{
- case TUT_BERSERK_CHAR:
+ case HINT_BERSERK_CHAR:
strcpy(desc, "(Melee oriented character with divine support)");
break;
- case TUT_MAGIC_CHAR:
+ case HINT_MAGIC_CHAR:
strcpy(desc, "(Magic oriented character)");
break;
- case TUT_RANGER_CHAR:
+ case HINT_RANGER_CHAR:
strcpy(desc, "(Ranged fighter)");
break;
default: // no further choices
@@ -265,19 +265,19 @@ void print_tutorial_menu(unsigned int type)
}
cprintf("%c - %s %s %s\n",
- letter, species_name(_get_tutorial_species(type), 1).c_str(),
- get_job_name(_get_tutorial_job(type)), desc);
+ letter, species_name(_get_hints_species(type), 1).c_str(),
+ get_job_name(_get_hints_job(type)), desc);
}
-static species_type _get_tutorial_species(unsigned int type)
+static species_type _get_hints_species(unsigned int type)
{
switch (type)
{
- case TUT_BERSERK_CHAR:
+ case HINT_BERSERK_CHAR:
return SP_MINOTAUR;
- case TUT_MAGIC_CHAR:
+ case HINT_MAGIC_CHAR:
return SP_DEEP_ELF;
- case TUT_RANGER_CHAR:
+ case HINT_RANGER_CHAR:
return SP_CENTAUR;
default:
// Use something fancy for debugging.
@@ -285,15 +285,15 @@ static species_type _get_tutorial_species(unsigned int type)
}
}
-static job_type _get_tutorial_job(unsigned int type)
+static job_type _get_hints_job(unsigned int type)
{
switch (type)
{
- case TUT_BERSERK_CHAR:
+ case HINT_BERSERK_CHAR:
return JOB_BERSERKER;
- case TUT_MAGIC_CHAR:
+ case HINT_MAGIC_CHAR:
return JOB_CONJURER;
- case TUT_RANGER_CHAR:
+ case HINT_RANGER_CHAR:
return JOB_HUNTER;
default:
// Use something fancy for debugging.
@@ -305,7 +305,7 @@ static job_type _get_tutorial_job(unsigned int type)
// position into normal closed doors.
// FIXME: Ideally, we'd need to zap secret doors that block the way
// between entrance and exit.
-void tutorial_zap_secret_doors()
+void hints_zap_secret_doors()
{
for (radius_iterator ri(you.pos(), 25, true, false); ri; ++ri)
if (grd(*ri) == DNGN_SECRET_DOOR)
@@ -313,7 +313,7 @@ void tutorial_zap_secret_doors()
}
// Prints the tutorial welcome screen.
-static void _tut_print_starting_info(unsigned int width)
+static void _hints_print_starting_info(unsigned int width)
{
std::string text;
@@ -355,167 +355,167 @@ static void _tut_print_starting_info(unsigned int width)
}
#ifdef TUTORIAL_DEBUG
-static std::string _tut_debug_list(int event)
+static std::string _hints_debug_list(int event)
{
switch (event)
{
- case TUT_SEEN_FIRST_OBJECT:
+ case HINT_SEEN_FIRST_OBJECT:
return "seen first object";
- case TUT_SEEN_POTION:
+ case HINT_SEEN_POTION:
return "seen first potion";
- case TUT_SEEN_SCROLL:
+ case HINT_SEEN_SCROLL:
return "seen first scroll";
- case TUT_SEEN_WAND:
+ case HINT_SEEN_WAND:
return "seen first wand";
- case TUT_SEEN_SPBOOK:
+ case HINT_SEEN_SPBOOK:
return "seen first spellbook";
- case TUT_SEEN_WEAPON:
+ case HINT_SEEN_WEAPON:
return "seen first weapon";
- case TUT_SEEN_MISSILES:
+ case HINT_SEEN_MISSILES:
return "seen first missiles";
- case TUT_SEEN_ARMOUR:
+ case HINT_SEEN_ARMOUR:
return "seen first armour";
- case TUT_SEEN_RANDART:
+ case HINT_SEEN_RANDART:
return "seen first random artefact";
- case TUT_SEEN_FOOD:
+ case HINT_SEEN_FOOD:
return "seen first food";
- case TUT_SEEN_CARRION:
+ case HINT_SEEN_CARRION:
return "seen first corpse";
- case TUT_SEEN_GOLD:
+ case HINT_SEEN_GOLD:
return "seen first pile of gold";
- case TUT_SEEN_JEWELLERY:
+ case HINT_SEEN_JEWELLERY:
return "seen first jewellery";
- case TUT_SEEN_MISC:
+ case HINT_SEEN_MISC:
return "seen first misc. item";
- case TUT_SEEN_MONSTER:
+ case HINT_SEEN_MONSTER:
return "seen first monster";
- case TUT_SEEN_ZERO_EXP_MON:
+ case HINT_SEEN_ZERO_EXP_MON:
return "seen first zero experience monster";
- case TUT_SEEN_TOADSTOOL:
+ case HINT_SEEN_TOADSTOOL:
return "seen first toadstool";
- case TUT_SEEN_STAIRS:
+ case HINT_SEEN_STAIRS:
return "seen first stairs";
- case TUT_SEEN_ESCAPE_HATCH:
+ case HINT_SEEN_ESCAPE_HATCH:
return "seen first escape hatch";
- case TUT_SEEN_BRANCH:
+ case HINT_SEEN_BRANCH:
return "seen first branch entrance";
- case TUT_SEEN_PORTAL:
+ case HINT_SEEN_PORTAL:
return "seen first portal vault entrance";
- case TUT_SEEN_TRAP:
+ case HINT_SEEN_TRAP:
return "encountered a trap";
- case TUT_SEEN_ALTAR:
+ case HINT_SEEN_ALTAR:
return "seen an altar";
- case TUT_SEEN_SHOP:
+ case HINT_SEEN_SHOP:
return "seen a shop";
- case TUT_SEEN_DOOR:
+ case HINT_SEEN_DOOR:
return "seen a closed door";
- case TUT_FOUND_SECRET_DOOR:
+ case HINT_FOUND_SECRET_DOOR:
return "found a secret door";
- case TUT_KILLED_MONSTER:
+ case HINT_KILLED_MONSTER:
return "killed first monster";
- case TUT_NEW_LEVEL:
+ case HINT_NEW_LEVEL:
return "gained a new level";
- case TUT_SKILL_RAISE:
+ case HINT_SKILL_RAISE:
return "raised a skill";
- case TUT_YOU_ENCHANTED:
+ case HINT_YOU_ENCHANTED:
return "caught an enchantment";
- case TUT_YOU_SICK:
+ case HINT_YOU_SICK:
return "became sick";
- case TUT_YOU_POISON:
+ case HINT_YOU_POISON:
return "were poisoned";
- case TUT_YOU_ROTTING:
+ case HINT_YOU_ROTTING:
return "were rotting";
- case TUT_YOU_CURSED:
+ case HINT_YOU_CURSED:
return "had something cursed";
- case TUT_YOU_HUNGRY:
+ case HINT_YOU_HUNGRY:
return "felt hungry";
- case TUT_YOU_STARVING:
+ case HINT_YOU_STARVING:
return "were starving";
- case TUT_MAKE_CHUNKS:
+ case HINT_MAKE_CHUNKS:
return "learned about chunks";
- case TUT_OFFER_CORPSE:
+ case HINT_OFFER_CORPSE:
return "learned about sacrifice";
- case TUT_MULTI_PICKUP:
+ case HINT_MULTI_PICKUP:
return "read about pickup menu";
- case TUT_HEAVY_LOAD:
+ case HINT_HEAVY_LOAD:
return "were encumbered";
- case TUT_ROTTEN_FOOD:
+ case HINT_ROTTEN_FOOD:
return "carried rotten food";
- case TUT_NEED_HEALING:
+ case HINT_NEED_HEALING:
return "needed healing";
- case TUT_NEED_POISON_HEALING:
+ case HINT_NEED_POISON_HEALING:
return "needed healing for poison";
- case TUT_INVISIBLE_DANGER:
+ case HINT_INVISIBLE_DANGER:
return "encountered an invisible foe";
- case TUT_NEED_HEALING_INVIS:
+ case HINT_NEED_HEALING_INVIS:
return "had to heal near an unseen monster";
- case TUT_ABYSS:
+ case HINT_ABYSS:
return "was cast into the Abyss";
- case TUT_POSTBERSERK:
+ case HINT_POSTBERSERK:
return "learned about Berserk after-effects";
- case TUT_RUN_AWAY:
+ case HINT_RUN_AWAY:
return "were told to run away";
- case TUT_RETREAT_CASTER:
+ case HINT_RETREAT_CASTER:
return "were told to retreat as a caster";
- case TUT_SHIFT_RUN:
+ case HINT_SHIFT_RUN:
return "learned about shift-run";
- case TUT_MAP_VIEW:
+ case HINT_MAP_VIEW:
return "learned about the level map";
- case TUT_AUTO_EXPLORE:
+ case HINT_AUTO_EXPLORE:
return "learned about auto-explore";
- case TUT_DONE_EXPLORE:
+ case HINT_DONE_EXPLORE:
return "explored a level";
- case TUT_AUTO_EXCLUSION:
+ case HINT_AUTO_EXCLUSION:
return "learned about exclusions";
- case TUT_YOU_MUTATED:
+ case HINT_YOU_MUTATED:
return "caught a mutation";
- case TUT_NEW_ABILITY_GOD:
+ case HINT_NEW_ABILITY_GOD:
return "gained a divine ability";
- case TUT_NEW_ABILITY_MUT:
+ case HINT_NEW_ABILITY_MUT:
return "gained a mutation-granted ability";
- case TUT_NEW_ABILITY_ITEM:
+ case HINT_NEW_ABILITY_ITEM:
return "gained an item-granted ability";
- case TUT_WIELD_WEAPON:
+ case HINT_WIELD_WEAPON:
return "wielded an unsuitable weapon";
- case TUT_FLEEING_MONSTER:
+ case HINT_FLEEING_MONSTER:
return "made a monster flee";
- case TUT_MONSTER_BRAND:
+ case HINT_MONSTER_BRAND:
return "learned about colour brandings";
- case TUT_MONSTER_FRIENDLY:
+ case HINT_MONSTER_FRIENDLY:
return "seen first friendly monster";
- case TUT_MONSTER_SHOUT:
+ case HINT_MONSTER_SHOUT:
return "experienced first shouting monster";
- case TUT_CONVERT:
+ case HINT_CONVERT:
return "converted to a god";
- case TUT_GOD_DISPLEASED:
+ case HINT_GOD_DISPLEASED:
return "piety ran low";
- case TUT_EXCOMMUNICATE:
+ case HINT_EXCOMMUNICATE:
return "excommunicated by a god";
- case TUT_SPELL_MISCAST:
+ case HINT_SPELL_MISCAST:
return "spell miscast";
- case TUT_SPELL_HUNGER:
+ case HINT_SPELL_HUNGER:
return "spell casting caused hunger";
- case TUT_GLOWING:
+ case HINT_GLOWING:
return "player glowing from contamination";
- case TUT_STAIR_BRAND:
+ case HINT_STAIR_BRAND:
return "saw stairs with objects on it";
- case TUT_HEAP_BRAND:
+ case HINT_HEAP_BRAND:
return "saw heap of objects";
- case TUT_TRAP_BRAND:
+ case HINT_TRAP_BRAND:
return "saw trap with objects on it";
- case TUT_YOU_RESIST:
+ case HINT_YOU_RESIST:
return "resisted some magic";
- case TUT_CAUGHT_IN_NET:
+ case HINT_CAUGHT_IN_NET:
return "were caught in a net";
- case TUT_LOAD_SAVED_GAME:
+ case HINT_LOAD_SAVED_GAME:
return "restored a saved game";
- case TUT_GAINED_MAGICAL_SKILL:
+ case HINT_GAINED_MAGICAL_SKILL:
return "gained a new magical skill";
- case TUT_CHOOSE_STAT:
+ case HINT_CHOOSE_STAT:
return "could choose a stat";
- case TUT_CAN_BERSERK:
+ case HINT_CAN_BERSERK:
return "were told to Berserk";
- case TUT_YOU_SILENCE:
+ case HINT_YOU_SILENCE:
return "experienced silence";
default:
return "faced a bug";
@@ -524,42 +524,42 @@ static std::string _tut_debug_list(int event)
// Lists all triggerable events and whether they actually were triggered
// at some point, at game start or reload.
-static formatted_string _tutorial_debug()
+static formatted_string _hints_debug()
{
std::string result;
bool lbreak = false;
snprintf(info, INFO_SIZE, "Tutorial Debug Screen");
- int i = _get_tutorial_cols()/2-1 - strlen(info) / 2;
+ int i = _get_hints_cols()/2-1 - strlen(info) / 2;
result += std::string(i, ' ');
result += "<white>";
result += info;
result += "</white>\n\n";
result += "<lightblue>";
- for (i = 0; i < TUT_EVENTS_NUM; i++)
+ for (i = 0; i < HINT_EVENTS_NUM; i++)
{
snprintf(info, INFO_SIZE, "%d: %s (%s)",
- i, _tut_debug_list(i).c_str(),
- Tutorial.tutorial_events[i] ? "true" : "false");
+ i, _hints_debug_list(i).c_str(),
+ Hints.hints_events[i] ? "true" : "false");
result += info;
// Break text into 2 columns where possible.
- if (strlen(info) >= _get_tutorial_cols()/2 || lbreak)
+ if (strlen(info) >= _get_hints_cols()/2 || lbreak)
{
result += "\n";
lbreak = false;
}
else
{
- result += std::string(_get_tutorial_cols()/2-1 - strlen(info), ' ');
+ result += std::string(_get_hints_cols()/2-1 - strlen(info), ' ');
lbreak = true;
}
}
result += "</lightblue>\n\n";
- snprintf(info, INFO_SIZE, "tutorial_left: %d\n", Tutorial.tutorial_left);
+ snprintf(info, INFO_SIZE, "hints_left: %d\n", Hints.hints_left);
result += info;
result += "\n";
@@ -573,7 +573,7 @@ static formatted_string _tutorial_debug()
#endif // debug
#ifndef USE_TILE
-static void _tutorial_map_intro()
+static void _hints_map_intro()
{
std::string result;
@@ -592,7 +592,7 @@ static void _tutorial_map_intro()
}
#endif
-static void _tutorial_stats_intro()
+static void _hints_stats_intro()
{
std::ostringstream istr;
@@ -641,7 +641,7 @@ static void _tutorial_stats_intro()
#endif
}
-static void _tutorial_message_intro()
+static void _hints_message_intro()
{
std::string result;
@@ -684,7 +684,7 @@ static void _tutorial_message_intro()
mpr(result, MSGCH_TUTORIAL, 0);
}
-static void _tutorial_movement_info()
+static void _hints_movement_info()
{
std::string text =
"To move your character, use the numpad; try Numlock both on and off. "
@@ -707,11 +707,11 @@ static void _tutorial_movement_info()
}
// copied from display_mutations and adapted
-void tut_starting_screen()
+void hints_starting_screen()
{
int MAX_INFO = 4;
#ifdef TUTORIAL_DEBUG
- MAX_INFO = 5; // add tutorial_debug
+ MAX_INFO = 5; // add hints_debug
#endif
char ch = 0;
@@ -729,7 +729,7 @@ void tut_starting_screen()
if (i == 0)
clrscr();
- int width = _get_tutorial_cols();
+ int width = _get_hints_cols();
#ifdef USE_TILE
// use a more sensible screen width
if (width < 80 && width < crawl_view.msgsz.x + crawl_view.hudsz.x)
@@ -738,22 +738,22 @@ void tut_starting_screen()
width = 80;
#endif
if (i == 0)
- _tut_print_starting_info(width);
+ _hints_print_starting_info(width);
else if (i == 1)
{
#ifdef USE_TILE
// Skip map explanation for Tiles.
continue;
#else
- _tutorial_map_intro();
+ _hints_map_intro();
#endif
}
else if (i == 2)
- _tutorial_stats_intro();
+ _hints_stats_intro();
else if (i == 3)
- _tutorial_message_intro();
+ _hints_message_intro();
else if (i == 4)
- _tutorial_movement_info();
+ _hints_movement_info();
else
{
#ifdef TUTORIAL_DEBUG
@@ -761,7 +761,7 @@ void tut_starting_screen()
#ifndef USE_TILE
cgotoxy(1,y_pos);
#endif
- _tutorial_debug().display();
+ _hints_debug().display();
#else
continue;
#endif
@@ -788,14 +788,14 @@ void tut_starting_screen()
}
// Called each turn from _input. Better name welcome.
-void tutorial_new_turn()
+void hints_new_turn()
{
- if (Tutorial.tutorial_left)
+ if (Hints.hints_left)
{
- Tutorial.tut_just_triggered = false;
+ Hints.hints_just_triggered = false;
if (you.attribute[ATTR_HELD])
- learned_something_new(TUT_CAUGHT_IN_NET);
+ learned_something_new(HINT_CAUGHT_IN_NET);
else if (i_feel_safe() && you.level_type != LEVEL_ABYSS)
{
// We don't want those "Whew, it's safe to rest now" messages
@@ -804,50 +804,50 @@ void tutorial_new_turn()
if (2 * you.hp < you.hp_max
|| 2 * you.magic_points < you.max_magic_points)
{
- tutorial_healing_reminder();
+ hints_healing_reminder();
}
else if (!you.running
- && Tutorial.tutorial_events[TUT_SHIFT_RUN]
+ && Hints.hints_events[HINT_SHIFT_RUN]
&& you.num_turns >= 200
&& you.hp == you.hp_max
&& you.magic_points == you.max_magic_points)
{
- learned_something_new(TUT_SHIFT_RUN);
+ learned_something_new(HINT_SHIFT_RUN);
}
else if (!you.running
- && Tutorial.tutorial_events[TUT_MAP_VIEW]
+ && Hints.hints_events[HINT_MAP_VIEW]
&& you.num_turns >= 500
&& you.hp == you.hp_max
&& you.magic_points == you.max_magic_points)
{
- learned_something_new(TUT_MAP_VIEW);
+ learned_something_new(HINT_MAP_VIEW);
- learned_something_new(TUT_MAP_VIEW);
+ learned_something_new(HINT_MAP_VIEW);
}
else if (!you.running
- && Tutorial.tutorial_events[TUT_AUTO_EXPLORE]
+ && Hints.hints_events[HINT_AUTO_EXPLORE]
&& you.num_turns >= 700
&& you.hp == you.hp_max
&& you.magic_points == you.max_magic_points)
{
- learned_something_new(TUT_AUTO_EXPLORE);
+ learned_something_new(HINT_AUTO_EXPLORE);
}
}
else
{
if (2*you.hp < you.hp_max)
- learned_something_new(TUT_RUN_AWAY);
+ learned_something_new(HINT_RUN_AWAY);
- if (Tutorial.tutorial_type == TUT_MAGIC_CHAR && you.magic_points < 1)
- learned_something_new(TUT_RETREAT_CASTER);
+ if (Hints.hints_type == HINT_MAGIC_CHAR && you.magic_points < 1)
+ learned_something_new(HINT_RETREAT_CASTER);
}
}
}
// Once a tutorial character dies, offer some playing hints.
-void tutorial_death_screen()
+void hints_death_screen()
{
- Tutorial.tutorial_left = 0;
+ Hints.hints_left = 0;
std::string text;
mpr( "Condolences! Your character's premature death is a sad, but "
@@ -859,13 +859,13 @@ void tutorial_death_screen()
MSGCH_TUTORIAL);
more();
- if (Tutorial.tutorial_type == TUT_MAGIC_CHAR
- && Tutorial.tut_spell_counter < Tutorial.tut_melee_counter )
+ if (Hints.hints_type == HINT_MAGIC_CHAR
+ && Hints.hints_spell_counter < Hints.hints_melee_counter )
{
text = "As a Conjurer your main weapon should be offensive magic. Cast "
"spells more often! Remember to rest when your Magic is low.";
}
- else if (you.religion == GOD_TROG && Tutorial.tut_berserk_counter <= 3
+ else if (you.religion == GOD_TROG && Hints.hints_berserk_counter <= 3
&& !you.berserk() && !you.duration[DUR_EXHAUSTED])
{
text = "Don't forget to go berserk when fighting particularly "
@@ -878,8 +878,8 @@ void tutorial_death_screen()
"need to go berserk.";
}
}
- else if (Tutorial.tutorial_type == TUT_RANGER_CHAR
- && 2*Tutorial.tut_throw_counter < Tutorial.tut_melee_counter )
+ else if (Hints.hints_type == HINT_RANGER_CHAR
+ && 2*Hints.hints_throw_counter < Hints.hints_melee_counter )
{
text = "Your bow and arrows are extremely powerful against distant "
"monsters. Be sure to collect all arrows lying around in the "
@@ -892,8 +892,8 @@ void tutorial_death_screen()
bool skip_first_hint = false;
// If a character has been unusually busy with projectiles and spells
// give some other hint rather than the first one.
- if (hint == 0 && Tutorial.tut_throw_counter + Tutorial.tut_spell_counter
- >= Tutorial.tut_melee_counter)
+ if (hint == 0 && Hints.hints_throw_counter + Hints.hints_spell_counter
+ >= Hints.hints_melee_counter)
{
hint = random2(5) + 1;
skip_first_hint = true;
@@ -976,17 +976,17 @@ void tutorial_death_screen()
mpr( "See you next game!", MSGCH_TUTORIAL);
- Tutorial.tutorial_events.init(false);
+ Hints.hints_events.init(false);
}
// 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()
+void hints_finished()
{
std::string text;
- Tutorial.tutorial_left = 0;
+ Hints.hints_left = 0;
text = "Congrats! You survived until the end of this tutorial - be sure "
"to try the other ones as well. Note that the command help screen "
"(<w>%?</w>) will look very different from now on. Here's a last "
@@ -996,7 +996,7 @@ void tutorial_finished()
mpr(text, MSGCH_TUTORIAL, 0);
more();
- if (Tutorial.tut_explored)
+ if (Hints.hints_explored)
{
text = "Walking around and exploring levels gets easier by using "
"auto-explore (<w>%</w>). Crawl will let you automatically "
@@ -1007,7 +1007,7 @@ void tutorial_finished()
#endif
insert_commands(text, CMD_EXPLORE, 0);
}
- else if (Tutorial.tut_travel)
+ else if (Hints.hints_travel)
{
text = "There is a convenient way for travelling between far away "
"dungeon levels: press <w>%</w> or <w>G</w> and enter "
@@ -1016,7 +1016,7 @@ void tutorial_finished()
"it.";
insert_commands(text, CMD_INTERLEVEL_TRAVEL, CMD_INTERLEVEL_TRAVEL, 0);
}
- else if (Tutorial.tut_stashes)
+ else if (Hints.hints_stashes)
{
text = "You can search among all items existing in the dungeon with "
"the <w>%</w> command. For example, "
@@ -1074,7 +1074,7 @@ void tutorial_finished()
mpr(text, MSGCH_TUTORIAL, 0);
more();
- Tutorial.tutorial_events.init(false);
+ Hints.hints_events.init(false);
// Unlink tutorial file.
const std::string basename = get_savedir_filename(you.your_name, "", "");
@@ -1083,27 +1083,27 @@ void tutorial_finished()
}
// Occasionally remind religious characters of sacrifices.
-void tutorial_dissection_reminder(bool healthy)
+void hints_dissection_reminder(bool healthy)
{
- if (Tutorial.tut_just_triggered || !Tutorial.tutorial_left)
+ if (Hints.hints_just_triggered || !Hints.hints_left)
return;
// When hungry, give appropriate message or at least don't suggest
// sacrifice.
if (you.hunger_state < HS_SATIATED && healthy)
{
- learned_something_new(TUT_MAKE_CHUNKS);
+ learned_something_new(HINT_MAKE_CHUNKS);
return;
}
if (!god_likes_fresh_corpses(you.religion))
return;
- if (Tutorial.tutorial_events[TUT_OFFER_CORPSE])
- learned_something_new(TUT_OFFER_CORPSE);
+ if (Hints.hints_events[HINT_OFFER_CORPSE])
+ learned_something_new(HINT_OFFER_CORPSE);
else if (one_chance_in(8))
{
- Tutorial.tut_just_triggered = true;
+ Hints.hints_just_triggered = true;
std::string text;
text += "If you don't want to eat it, consider offering this "
@@ -1127,35 +1127,35 @@ void tutorial_dissection_reminder(bool healthy)
}
// Occasionally remind injured characters of resting.
-void tutorial_healing_reminder()
+void hints_healing_reminder()
{
- if (!Tutorial.tutorial_left)
+ if (!Hints.hints_left)
return;
if (you.duration[DUR_POISONING] && 2*you.hp < you.hp_max)
{
- if (Tutorial.tutorial_events[TUT_NEED_POISON_HEALING])
- learned_something_new(TUT_NEED_POISON_HEALING);
+ if (Hints.hints_events[HINT_NEED_POISON_HEALING])
+ learned_something_new(HINT_NEED_POISON_HEALING);
}
- else if (Tutorial.tut_seen_invisible > 0
- && you.num_turns - Tutorial.tut_seen_invisible <= 20)
+ else if (Hints.hints_seen_invisible > 0
+ && you.num_turns - Hints.hints_seen_invisible <= 20)
{
// If we recently encountered an invisible monster, we need a
// special message.
- learned_something_new(TUT_NEED_HEALING_INVIS);
+ learned_something_new(HINT_NEED_HEALING_INVIS);
// If that one was already displayed, don't print a reminder.
}
else
{
- if (Tutorial.tutorial_events[TUT_NEED_HEALING])
- learned_something_new(TUT_NEED_HEALING);
- else if (you.num_turns - Tutorial.tut_last_healed >= 50
+ if (Hints.hints_events[HINT_NEED_HEALING])
+ learned_something_new(HINT_NEED_HEALING);
+ else if (you.num_turns - Hints.hints_last_healed >= 50
&& !you.duration[DUR_POISONING])
{
- if (Tutorial.tut_just_triggered)
+ if (Hints.hints_just_triggered)
return;
- Tutorial.tut_just_triggered = 1;
+ Hints.hints_just_triggered = 1;
std::string text;
text = "Remember to rest between fights and to enter unexplored "
@@ -1184,7 +1184,7 @@ void tutorial_healing_reminder()
if (is_resting())
stop_running();
}
- Tutorial.tut_last_healed = you.num_turns;
+ Hints.hints_last_healed = you.num_turns;
}
}
@@ -1195,43 +1195,43 @@ void taken_new_item(unsigned char item_type)
switch (item_type)
{
case OBJ_WANDS:
- learned_something_new(TUT_SEEN_WAND);
+ learned_something_new(HINT_SEEN_WAND);
break;
case OBJ_SCROLLS:
- learned_something_new(TUT_SEEN_SCROLL);
+ learned_something_new(HINT_SEEN_SCROLL);
break;
case OBJ_JEWELLERY:
- learned_something_new(TUT_SEEN_JEWELLERY);
+ learned_something_new(HINT_SEEN_JEWELLERY);
break;
case OBJ_POTIONS:
- learned_something_new(TUT_SEEN_POTION);
+ learned_something_new(HINT_SEEN_POTION);
break;
case OBJ_BOOKS:
- learned_something_new(TUT_SEEN_SPBOOK);
+ learned_something_new(HINT_SEEN_SPBOOK);
break;
case OBJ_FOOD:
- learned_something_new(TUT_SEEN_FOOD);
+ learned_something_new(HINT_SEEN_FOOD);
break;
case OBJ_CORPSES:
- learned_something_new(TUT_SEEN_CARRION);
+ learned_something_new(HINT_SEEN_CARRION);
break;
case OBJ_WEAPONS:
- learned_something_new(TUT_SEEN_WEAPON);
+ learned_something_new(HINT_SEEN_WEAPON);
break;
case OBJ_ARMOUR:
- learned_something_new(TUT_SEEN_ARMOUR);
+ learned_something_new(HINT_SEEN_ARMOUR);
break;
case OBJ_MISSILES:
- learned_something_new(TUT_SEEN_MISSILES);
+ learned_something_new(HINT_SEEN_MISSILES);
break;
case OBJ_MISCELLANY:
- learned_something_new(TUT_SEEN_MISC);
+ learned_something_new(HINT_SEEN_MISC);
break;
case OBJ_STAVES:
- learned_something_new(TUT_SEEN_STAFF);
+ learned_something_new(HINT_SEEN_STAFF);
break;
case OBJ_GOLD:
- learned_something_new(TUT_SEEN_GOLD);
+ learned_something_new(HINT_SEEN_GOLD);
break;
default: // nothing to be done
return;
@@ -1239,12 +1239,12 @@ void taken_new_item(unsigned char item_type)
}
// Give a special message if you gain a skill you didn't have before.
-void tut_gained_new_skill(int skill)
+void hints_gained_new_skill(int skill)
{
- if (!Tutorial.tutorial_left)
+ if (!Hints.hints_left)
return;
- learned_something_new(TUT_SKILL_RAISE);
+ learned_something_new(HINT_SKILL_RAISE);
switch (skill)
{
@@ -1278,7 +1278,7 @@ void tut_gained_new_skill(int skill)
case SK_AIR_MAGIC:
case SK_EARTH_MAGIC:
case SK_POISON_MAGIC:
- learned_something_new(TUT_GAINED_MAGICAL_SKILL);
+ learned_something_new(HINT_GAINED_MAGICAL_SKILL);
break;
// Melee skills.
@@ -1288,14 +1288,14 @@ void tut_gained_new_skill(int skill)
case SK_MACES_FLAILS:
case SK_POLEARMS:
case SK_STAVES:
- learned_something_new(TUT_GAINED_MELEE_SKILL);
+ learned_something_new(HINT_GAINED_MELEE_SKILL);
break;
// Ranged skills.
case SK_SLINGS:
case SK_BOWS:
case SK_CROSSBOWS:
- learned_something_new(TUT_GAINED_RANGED_SKILL);
+ learned_something_new(HINT_GAINED_RANGED_SKILL);
break;
default:
@@ -1374,51 +1374,51 @@ static bool _advise_use_wand()
return (false);
}
-void tutorial_monster_seen(const monsters &mon)
+void hints_monster_seen(const monsters &mon)
{
if (mons_class_flag(mon.type, M_NO_EXP_GAIN))
{
- tutorial_event_type et = mon.type == MONS_TOADSTOOL ?
- TUT_SEEN_TOADSTOOL : TUT_SEEN_ZERO_EXP_MON;
+ hints_event_type et = mon.type == MONS_TOADSTOOL ?
+ HINT_SEEN_TOADSTOOL : HINT_SEEN_ZERO_EXP_MON;
- if (Tutorial.tutorial_events[et])
+ if (Hints.hints_events[et])
{
- if (Tutorial.tut_just_triggered)
+ if (Hints.hints_just_triggered)
return;
learned_something_new(et, mon.pos());
return;
}
- // Don't do TUT_SEEN_MONSTER for zero exp monsters.
- if (Tutorial.tutorial_events[TUT_SEEN_MONSTER])
+ // Don't do HINT_SEEN_MONSTER for zero exp monsters.
+ if (Hints.hints_events[HINT_SEEN_MONSTER])
return;
}
- if (!Tutorial.tutorial_events[TUT_SEEN_MONSTER])
+ if (!Hints.hints_events[HINT_SEEN_MONSTER])
{
- if (Tutorial.tut_just_triggered)
+ if (Hints.hints_just_triggered)
return;
if (_mons_is_highlighted(&mon))
- learned_something_new(TUT_MONSTER_BRAND, mon.pos());
+ learned_something_new(HINT_MONSTER_BRAND, mon.pos());
if (mon.friendly())
- learned_something_new(TUT_MONSTER_FRIENDLY, mon.pos());
+ learned_something_new(HINT_MONSTER_FRIENDLY, mon.pos());
if (you.religion == GOD_TROG && !you.berserk()
&& !you.duration[DUR_EXHAUSTED] && you.hunger_state >= HS_SATIATED
&& one_chance_in(4))
{
- learned_something_new(TUT_CAN_BERSERK);
+ learned_something_new(HINT_CAN_BERSERK);
}
return;
}
stop_running();
- Tutorial.tutorial_events[TUT_SEEN_MONSTER] = false;
- Tutorial.tutorial_left--;
- Tutorial.tut_just_triggered = true;
+ Hints.hints_events[HINT_SEEN_MONSTER] = false;
+ Hints.hints_left--;
+ Hints.hints_just_triggered = true;
std::string text = "That ";
#ifdef USE_TILE
@@ -1459,7 +1459,7 @@ void tutorial_monster_seen(const monsters &mon)
mpr(text, MSGCH_TUTORIAL, 0);
- if (Tutorial.tutorial_type == TUT_RANGER_CHAR)
+ if (Hints.hints_type == HINT_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 from your "
@@ -1490,7 +1490,7 @@ void tutorial_monster_seen(const monsters &mon)
mpr(text, MSGCH_TUTORIAL, 0);
}
- else if (Tutorial.tutorial_type == TUT_MAGIC_CHAR)
+ else if (Hints.hints_type == HINT_MAGIC_CHAR)
{
text = "However, as a conjurer you will want to deal with it using "
"magic. If you have a look at your spellbook from your "
@@ -1506,32 +1506,32 @@ void tutorial_monster_seen(const monsters &mon)
}
}
-void tutorial_first_item(const item_def &item)
+void hints_first_item(const item_def &item)
{
// Happens if monster is standing on dropped corpse or item.
if (monster_at(item.pos))
return;
- if (!Tutorial.tutorial_events[TUT_SEEN_FIRST_OBJECT]
- || Tutorial.tut_just_triggered)
+ if (!Hints.hints_events[HINT_SEEN_FIRST_OBJECT]
+ || Hints.hints_just_triggered)
{
// NOTE: Since a new player might not think to pick up a
- // corpse (and why should they?), TUT_SEEN_CARRION is done when a
+ // corpse (and why should they?), HINT_SEEN_CARRION is done when a
// corpse is first seen.
- if (!Tutorial.tut_just_triggered
+ if (!Hints.hints_just_triggered
&& item.base_type == OBJ_CORPSES
&& !monster_at(item.pos))
{
- learned_something_new(TUT_SEEN_CARRION, item.pos);
+ learned_something_new(HINT_SEEN_CARRION, item.pos);
}
return;
}
stop_running();
- Tutorial.tutorial_events[TUT_SEEN_FIRST_OBJECT] = false;
- Tutorial.tutorial_left--;
- Tutorial.tut_just_triggered = true;
+ Hints.hints_events[HINT_SEEN_FIRST_OBJECT] = false;
+ Hints.hints_left--;
+ Hints.hints_just_triggered = true;
std::string text = "That ";
#ifndef USE_TILE
@@ -1718,8 +1718,8 @@ static std::string _describe_portal(const coord_def &gc)
#define DELAY_EVENT \
{ \
- Tutorial.tutorial_events[seen_what] = true; \
- Tutorial.tutorial_left++; \
+ Hints.hints_events[seen_what] = true; \
+ Hints.hints_left++; \
return; \
}
@@ -1727,41 +1727,41 @@ static std::string _describe_portal(const coord_def &gc)
// learned_something_new() was already triggered this turn.
// NOTE: If put off, the SEEN_<feature> variant will be triggered the
// next turn, so they may be rare but aren't urgent.
-static bool _rare_tutorial_event(tutorial_event_type event)
+static bool _rare_hints_event(hints_event_type event)
{
switch (event)
{
- case TUT_FOUND_SECRET_DOOR:
- case TUT_KILLED_MONSTER:
- case TUT_NEW_LEVEL:
- case TUT_YOU_ENCHANTED:
- case TUT_YOU_SICK:
- case TUT_YOU_POISON:
- case TUT_YOU_ROTTING:
- case TUT_YOU_CURSED:
- case TUT_YOU_HUNGRY:
- case TUT_YOU_STARVING:
- case TUT_GLOWING:
- case TUT_CAUGHT_IN_NET:
- case TUT_YOU_SILENCE:
- case TUT_NEED_POISON_HEALING:
- case TUT_INVISIBLE_DANGER:
- case TUT_NEED_HEALING_INVIS:
- case TUT_ABYSS:
- case TUT_RUN_AWAY:
- case TUT_RETREAT_CASTER:
- case TUT_YOU_MUTATED:
- case TUT_NEW_ABILITY_GOD:
- case TUT_NEW_ABILITY_MUT:
- case TUT_NEW_ABILITY_ITEM:
- case TUT_CONVERT:
- case TUT_GOD_DISPLEASED:
- case TUT_EXCOMMUNICATE:
- case TUT_GAINED_MAGICAL_SKILL:
- case TUT_GAINED_MELEE_SKILL:
- case TUT_GAINED_RANGED_SKILL:
- case TUT_CHOOSE_STAT:
- case TUT_AUTO_EXCLUSION:
+ case HINT_FOUND_SECRET_DOOR:
+ case HINT_KILLED_MONSTER:
+ case HINT_NEW_LEVEL:
+ case HINT_YOU_ENCHANTED:
+ case HINT_YOU_SICK:
+ case HINT_YOU_POISON:
+ case HINT_YOU_ROTTING:
+ case HINT_YOU_CURSED:
+ case HINT_YOU_HUNGRY:
+ case HINT_YOU_STARVING:
+ case HINT_GLOWING:
+ case HINT_CAUGHT_IN_NET:
+ case HINT_YOU_SILENCE:
+ case HINT_NEED_POISON_HEALING:
+ case HINT_INVISIBLE_DANGER:
+ case HINT_NEED_HEALING_INVIS:
+ case HINT_ABYSS:
+ case HINT_RUN_AWAY:
+ case HINT_RETREAT_CASTER:
+ case HINT_YOU_MUTATED:
+ case HINT_NEW_ABILITY_GOD:
+ case HINT_NEW_ABILITY_MUT:
+ case HINT_NEW_ABILITY_ITEM:
+ case HINT_CONVERT:
+ case HINT_GOD_DISPLEASED:
+ case HINT_EXCOMMUNICATE:
+ case HINT_GAINED_MAGICAL_SKILL:
+ case HINT_GAINED_MELEE_SKILL:
+ case HINT_GAINED_RANGED_SKILL:
+ case HINT_CHOOSE_STAT:
+ case HINT_AUTO_EXCLUSION:
return (true);
default:
return (false);
@@ -1769,14 +1769,14 @@ static bool _rare_tutorial_event(tutorial_event_type event)
}
// Here most of the tutorial messages for various triggers are handled.
-void learned_something_new(tutorial_event_type seen_what, coord_def gc)
+void learned_something_new(hints_event_type seen_what, coord_def gc)
{
// Already learned about that.
- if (!Tutorial.tutorial_events[seen_what])
+ if (!Hints.hints_events[seen_what])
return;
// Don't trigger twice in the same turn.
- if (Tutorial.tut_just_triggered && !_rare_tutorial_event(seen_what))
+ if (Hints.hints_just_triggered && !_rare_hints_event(seen_what))
return;
std::ostringstream text;
@@ -1786,13 +1786,13 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
const coord_def e = grid2show(gc);
#endif
- Tutorial.tut_just_triggered = true;
- Tutorial.tutorial_events[seen_what] = false;
- Tutorial.tutorial_left--;
+ Hints.hints_just_triggered = true;
+ Hints.hints_events[seen_what] = false;
+ Hints.hints_left--;
switch (seen_what)
{
- case TUT_SEEN_POTION:
+ case HINT_SEEN_POTION:
text << "You have picked up your first potion"
#ifndef USE_TILE
" ('<w>!</w>'). Use "
@@ -1808,7 +1808,7 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
cmd.push_back(CMD_QUAFF);
break;
- case TUT_SEEN_SCROLL:
+ case HINT_SEEN_SCROLL:
text << "You have picked up your first scroll"
#ifndef USE_TILE
" ('<w>?</w>'). Type "
@@ -1822,7 +1822,7 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
cmd.push_back(CMD_READ);
break;
- case TUT_SEEN_WAND:
+ case HINT_SEEN_WAND:
text << "You have picked up your first wand"
#ifndef USE_TILE
" ('<w>/</w>'). Type "
@@ -1834,7 +1834,7 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
cmd.push_back(CMD_EVOKE);
break;
- case TUT_SEEN_SPBOOK:
+ case HINT_SEEN_SPBOOK:
text << "You have picked up a book ";
#ifndef USE_TILE
text << "('<w>";
@@ -1877,7 +1877,7 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
#endif
break;
- case TUT_SEEN_WEAPON:
+ case HINT_SEEN_WEAPON:
text << "This is the first weapon "
#ifndef USE_TILE
"('<w>)</w>') "
@@ -1897,13 +1897,13 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
cmd.push_back(CMD_WIELD_WEAPON);
cmd.push_back(CMD_DISPLAY_INVENTORY);
- if (Tutorial.tutorial_type == TUT_BERSERK_CHAR)
+ if (Hints.hints_type == HINT_BERSERK_CHAR)
{
text << "\nAs you're already trained in Axes you should stick "
"with these. Checking other axes' enchantments and "
"attributes can be worthwhile.";
}
- else if (Tutorial.tutorial_type == TUT_MAGIC_CHAR)
+ else if (Hints.hints_type == HINT_MAGIC_CHAR)
{
text << "\nAs a spellslinger you don't need a weapon to fight. "
"However, you should still carry at least one knife, "
@@ -1911,7 +1911,7 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
}
break;
- case TUT_SEEN_MISSILES:
+ case HINT_SEEN_MISSILES:
text << "This is the first stack of missiles "
#ifndef USE_TILE
"('<w>(</w>') "
@@ -1930,12 +1930,12 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
cmd.push_back(CMD_DISPLAY_INVENTORY);
- if (Tutorial.tutorial_type == TUT_RANGER_CHAR)
+ if (Hints.hints_type == HINT_RANGER_CHAR)
{
text << "\nAs you're already trained in Bows you should stick "
"with arrows and collect more of them in the dungeon.";
}
- else if (Tutorial.tutorial_type == TUT_MAGIC_CHAR)
+ else if (Hints.hints_type == HINT_MAGIC_CHAR)
{
text << "\nHowever, as a spellslinger, you don't really need "
"another type of ranged attack, unless there's another "
@@ -1948,7 +1948,7 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
}
break;
- case TUT_SEEN_ARMOUR:
+ case HINT_SEEN_ARMOUR:
text << "This is the first piece of armour "
#ifndef USE_TILE
"('<w>[</w>') "
@@ -1975,14 +1975,14 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
}
break;
- case TUT_SEEN_RANDART:
+ case HINT_SEEN_RANDART:
text << "Weapons and armour that have unusual descriptions like this "
"are much more likely to be of higher enchantment or have "
"special properties, good or bad. The rarer the description, "
"the greater the potential value of an item.";
break;
- case TUT_SEEN_FOOD:
+ case HINT_SEEN_FOOD:
text << "You have picked up some food"
#ifndef USE_TILE
" ('<w>percent</w>')"
@@ -1997,7 +1997,7 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
cmd.push_back(CMD_EAT);
break;
- case TUT_SEEN_CARRION:
+ case HINT_SEEN_CARRION:
// NOTE: This is called when a corpse is first seen as well as when
// first picked up, since a new player might not think to pick
// up a corpse.
@@ -2072,7 +2072,7 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
cmd.push_back(CMD_DISPLAY_INVENTORY);
break;
- case TUT_SEEN_JEWELLERY:
+ case HINT_SEEN_JEWELLERY:
text << "You have picked up a a piece of jewellery, either a ring"
#ifndef USE_TILE
<< " ('<w>=</w>')"
@@ -2094,7 +2094,7 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
cmd.push_back(CMD_DISPLAY_INVENTORY);
break;
- case TUT_SEEN_MISC:
+ case HINT_SEEN_MISC:
text << "This is a curious object indeed. You can play around with "
"it to find out what it does by "
#ifdef USE_TILE
@@ -2111,7 +2111,7 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
cmd.push_back(CMD_DISPLAY_INVENTORY);
break;
- case TUT_SEEN_STAFF:
+ case HINT_SEEN_STAFF:
text << "You have picked up a magic staff or a rod"
#ifndef USE_TILE
", both of which are represented by '<w>";
@@ -2138,7 +2138,7 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
cmd.push_back(CMD_DISPLAY_INVENTORY);
break;
- case TUT_SEEN_GOLD:
+ case HINT_SEEN_GOLD:
text << "You have picked up your first pile of gold"
#ifndef USE_TILE
" ('<yellow>$</yellow>')"
@@ -2159,7 +2159,7 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
}
break;
- case TUT_SEEN_STAIRS:
+ case HINT_SEEN_STAIRS:
// Don't give this information during the first turn, to give
// the player time to have a look around.
if (you.num_turns < 1)
@@ -2190,7 +2190,7 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
#endif
break;
- case TUT_SEEN_ESCAPE_HATCH:
+ case HINT_SEEN_ESCAPE_HATCH:
if (you.num_turns < 1)
DELAY_EVENT;
@@ -2218,7 +2218,7 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
cmd.push_back(CMD_GO_DOWNSTAIRS);
break;
- case TUT_SEEN_BRANCH:
+ case HINT_SEEN_BRANCH:
text << "This ";
#ifndef USE_TILE
// Is a monster blocking the view?
@@ -2245,7 +2245,7 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
"altars at which you might convert to a new god.";
break;
- case TUT_SEEN_PORTAL:
+ case HINT_SEEN_PORTAL:
// Delay in the unlikely event that a player still in tutorial mode
// creates a portal with a Trowel card, since a portal vault
// entry's description doesn't seem to get set properly until
@@ -2267,7 +2267,7 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
text << _describe_portal(gc);
break;
- case TUT_STAIR_BRAND:
+ case HINT_STAIR_BRAND:
// Monster or player standing on stairs.
if (actor_at(gc))
DELAY_EVENT;
@@ -2283,7 +2283,7 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
#endif
break;
- case TUT_HEAP_BRAND:
+ case HINT_HEAP_BRAND:
// Monster or player standing on heap.
if (actor_at(gc))
DELAY_EVENT;
@@ -2300,7 +2300,7 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
#endif
break;
- case TUT_TRAP_BRAND:
+ case HINT_TRAP_BRAND:
#ifdef USE_TILE
// Tiles show both the trap and the item heap.
return;
@@ -2315,7 +2315,7 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
#endif
break;
- case TUT_SEEN_TRAP:
+ case HINT_SEEN_TRAP:
if (you.pos() == gc)
text << "Oops... you just triggered a trap. ";
else
@@ -2343,7 +2343,7 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
"while standing next to it.";
break;
- case TUT_SEEN_ALTAR:
+ case HINT_SEEN_ALTAR:
text << "That ";
#ifndef USE_TILE
text << glyph_to_tagstr(get_show_glyph(env.show(e))) << " ";
@@ -2369,7 +2369,7 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
cmd.push_back(CMD_PRAY);
if (you.religion == GOD_NO_GOD
- && Tutorial.tutorial_type == TUT_MAGIC_CHAR)
+ && Hints.hints_type == HINT_MAGIC_CHAR)
{
text << "\n\nThe best god for an unexperienced conjurer is "
"probably Vehumet, though Sif Muna is a good second "
@@ -2377,7 +2377,7 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
}
break;
- case TUT_SEEN_SHOP:
+ case HINT_SEEN_SHOP:
#ifdef USE_TILE
tiles.place_cursor(CURSOR_TUTORIAL, gc);
tiles.add_text_tag(TAG_TUTORIAL, shop_name(gc), gc);
@@ -2401,7 +2401,7 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
"you gather enough gold to buy the items on your list.";
break;
- case TUT_SEEN_DOOR:
+ case HINT_SEEN_DOOR:
if (you.num_turns < 1)
DELAY_EVENT;
@@ -2425,7 +2425,7 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
text << "\nIn Tiles, the same can be achieved by clicking on an "
"adjacent door square.";
#endif
- if (!Tutorial.tut_explored)
+ if (!Hints.hints_explored)
{
text << "\nTo avoid accidentally opening a door you'd rather "
"remain closed during travel or autoexplore, you can mark "
@@ -2439,7 +2439,7 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
}
break;
- case TUT_FOUND_SECRET_DOOR:
+ case HINT_FOUND_SECRET_DOOR:
#ifdef USE_TILE
tiles.place_cursor(CURSOR_TUTORIAL, gc);
tiles.add_text_tag(TAG_TUTORIAL, "Secret door", gc);
@@ -2472,19 +2472,19 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
"totally disconnected from the section you're searching.";
break;
- case TUT_KILLED_MONSTER:
+ case HINT_KILLED_MONSTER:
text << "Congratulations, your character just gained some experience "
"by killing this monster! Every action will use up some of "
"it to train certain skills. For example, fighting monsters ";
- if (Tutorial.tutorial_type == TUT_BERSERK_CHAR)
+ if (Hints.hints_type == HINT_BERSERK_CHAR)
{
text << "in melee battle will raise your Axes and Fighting "
"skills.";
}
- else if (Tutorial.tutorial_type == TUT_RANGER_CHAR)
+ else if (Hints.hints_type == HINT_RANGER_CHAR)
text << "using bow and arrows will raise your Bows skill.";
- else // if (Tutorial.tutorial_type == TUT_MAGIC_CHAR)
+ else // if (Hints.hints_type == HINT_MAGIC_CHAR)
{
text << "with offensive magic will raise your Conjurations and "
"Spellcasting skills.";
@@ -2499,13 +2499,13 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
}
break;
- case TUT_NEW_LEVEL:
+ case HINT_NEW_LEVEL:
text << "Well done! Reaching a new experience level is always a nice "
"event: you get more health and magic points, and "
"occasionally increases to your attributes (strength, "
"dexterity, intelligence).";
- if (Tutorial.tutorial_type == TUT_MAGIC_CHAR)
+ if (Hints.hints_type == HINT_MAGIC_CHAR)
{
text << "\nAlso, new experience levels let you learn more spells "
"(the Spellcasting skill also does this). For now, you "
@@ -2523,14 +2523,14 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
}
break;
- case TUT_SKILL_RAISE:
+ case HINT_SKILL_RAISE:
text << "One of your skills just got raised. You can train your skills "
"or pick up new ones by performing the corresponding actions. "
"To view or manage your skill set, type <w>%</w>.";
cmd.push_back(CMD_DISPLAY_SKILLS);
break;
- case TUT_GAINED_MAGICAL_SKILL:
+ case HINT_GAINED_MAGICAL_SKILL:
text << "Being skilled in a magical \"school\" makes it easier to "
"learn and cast spells of this school. Many spells belong to "
"a combination of several schools, in which case the average "
@@ -2538,7 +2538,7 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
"and power.";
break;
- case TUT_GAINED_MELEE_SKILL:
+ case HINT_GAINED_MELEE_SKILL:
text << "Being skilled with a particular type of weapon will make it "
"easier to fight with all weapons of this type, and make you "
"deal more damage with them. It is generally recommended to "
@@ -2549,14 +2549,14 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
"Axes/Polearms, Polearms/Staves, and Axes/Maces.";
break;
- case TUT_GAINED_RANGED_SKILL:
+ case HINT_GAINED_RANGED_SKILL:
text << "Being skilled in a particular type of ranged attack will let "
"you deal more damage when using the appropriate weapons. It "
"is usually best to concentrate on one type of ranged attack "
"(including spells), and to add another one as back-up.";
break;
- case TUT_CHOOSE_STAT:
+ case HINT_CHOOSE_STAT:
text << "Every third level you may choose what stat to invest in, "
"Strength, Dexterity, or Intelligence. <w>Strength</w> "
"influences the amount you can carry, and increases the damage "
@@ -2568,7 +2568,7 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
"stats to a minimum of 8, so as to prevent death by stat loss.";
break;
- case TUT_YOU_ENCHANTED:
+ case HINT_YOU_ENCHANTED:
text << "Enchantments of all types can befall you temporarily. "
"Brief descriptions of these appear at the lower end of the "
"stats area. Press <w>%</w> for more details. A list of all "
@@ -2577,12 +2577,12 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
cmd.push_back(CMD_DISPLAY_COMMANDS);
break;
- case TUT_YOU_SICK:
- // Hack: reset tut_just_triggered, to force recursive calling of
+ case HINT_YOU_SICK:
+ // Hack: reset hints_just_triggered, to force recursive calling of
// learned_something_new().
- Tutorial.tut_just_triggered = false;
- learned_something_new(TUT_YOU_ENCHANTED);
- Tutorial.tut_just_triggered = true;
+ Hints.hints_just_triggered = false;
+ learned_something_new(HINT_YOU_ENCHANTED);
+ Hints.hints_just_triggered = true;
text << "Chunks and corpses that are described as "
"<brown>contaminated</brown> can make you sick when eating "
"them. However, there's only a chance of this happening and "
@@ -2606,12 +2606,12 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
cmd.push_back(CMD_QUAFF);
break;
- case TUT_YOU_POISON:
- // Hack: reset tut_just_triggered, to force recursive calling of
+ case HINT_YOU_POISON:
+ // Hack: reset hints_just_triggered, to force recursive calling of
// learned_something_new().
- Tutorial.tut_just_triggered = false;
- learned_something_new(TUT_YOU_ENCHANTED);
- Tutorial.tut_just_triggered = true;
+ Hints.hints_just_triggered = false;
+ learned_something_new(HINT_YOU_ENCHANTED);
+ Hints.hints_just_triggered = true;
text << "Poison will slowly reduce your HP. It wears off with time (";
if (!i_feel_safe())
@@ -2626,12 +2626,12 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
cmd.push_back(CMD_QUAFF);
break;
- case TUT_YOU_ROTTING:
- // Hack: Reset tut_just_triggered, to force recursive calling of
+ case HINT_YOU_ROTTING:
+ // Hack: Reset hints_just_triggered, to force recursive calling of
// learned_something_new().
- Tutorial.tut_just_triggered = false;
- learned_something_new(TUT_YOU_ENCHANTED);
- Tutorial.tut_just_triggered = true;
+ Hints.hints_just_triggered = false;
+ learned_something_new(HINT_YOU_ENCHANTED);
+ Hints.hints_just_triggered = true;
text << "Ugh, your flesh is rotting! Not only does this slowly "
"reduce your HP, it also slowly reduces your <w>maximum</w> "
@@ -2646,7 +2646,7 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
cmd.push_back(CMD_QUAFF);
break;
- case TUT_YOU_CURSED:
+ case HINT_YOU_CURSED:
text << "Curses are comparatively harmless, but they do mean that "
"you cannot remove cursed equipment and will have to suffer "
"the (possibly) bad effects until you find and read a scroll "
@@ -2657,7 +2657,7 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
cmd.push_back(CMD_BUTCHER);
break;
- case TUT_YOU_HUNGRY:
+ case HINT_YOU_HUNGRY:
text << "There are two ways to overcome hunger: food you started "
"with or found, and self-made chunks from corpses. To get the "
"latter, all you need to do is <w>%</w>hop up a corpse "
@@ -2680,7 +2680,7 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
"so you should pick up the first knife, dagger, sword "
"or axe you find. ";
}
- else if (Tutorial.tutorial_type != TUT_MAGIC_CHAR)
+ else if (Hints.hints_type != HINT_MAGIC_CHAR)
text << "Your starting weapon will do nicely. ";
else if (num == 1)
text << "The slicing weapon you picked up will do nicely. ";
@@ -2693,11 +2693,11 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
text << "Try to dine on chunks in order to save permanent food.";
- if (Tutorial.tutorial_type == TUT_BERSERK_CHAR)
+ if (Hints.hints_type == HINT_BERSERK_CHAR)
text << "\nNote that you cannot Berserk while hungry or worse.";
break;
- case TUT_YOU_STARVING:
+ case HINT_YOU_STARVING:
text << "You are now suffering from terrible hunger. You'll need to "
"<w>%</w>at something quickly, or you'll die. The safest "
"way to deal with this is to simply eat something from your "
@@ -2706,11 +2706,11 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
"nutrition, though not as much as food.";
cmd.push_back(CMD_EAT);
- if (Tutorial.tutorial_type == TUT_MAGIC_CHAR)
+ if (Hints.hints_type == HINT_MAGIC_CHAR)
text << "\nNote that you cannot cast spells while starving.";
break;
- case TUT_MULTI_PICKUP:
+ case HINT_MULTI_PICKUP:
text << "There's a more comfortable way to pick up several items at "
"the same time. If you press <w>%</w> or <w>g</w> "
#ifdef USE_TILE
@@ -2727,7 +2727,7 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
cmd.push_back(CMD_PICKUP);
break;
- case TUT_HEAVY_LOAD:
+ case HINT_HEAVY_LOAD:
if (you.burden_state != BS_UNENCUMBERED)
{
text << "It is not usually a good idea to run around encumbered; "
@@ -2750,14 +2750,14 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
"clicking on them.";
#endif
- if (Tutorial.tut_stashes)
+ if (Hints.hints_stashes)
{
text << "\n\nYou can easily find items you've left on the floor "
"with the <w>%</w> command, which will let you "
"seach for all known items in the dungeon. For example, "
"<w>% \"knife\"</w> will list all knives. You can "
"can then travel to one of the spots.";
- Tutorial.tut_stashes = false;
+ Hints.hints_stashes = false;
cmd.push_back(CMD_SEARCH_STASHES);
cmd.push_back(CMD_SEARCH_STASHES);
}
@@ -2766,7 +2766,7 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
"be picked up and used by monsters.";
break;
- case TUT_ROTTEN_FOOD:
+ case HINT_ROTTEN_FOOD:
text << "One or more of the chunks or corpses you carry has started "
"to rot. Few species can digest these safely, so you might "
"just as well <w>%</w>rop them now. When selecting items from "
@@ -2775,7 +2775,7 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
cmd.push_back(CMD_DROP);
break;
- case TUT_MAKE_CHUNKS:
+ case HINT_MAKE_CHUNKS:
text << "How lucky! That monster left a corpse which you can now "
"<w>%</w>hop up";
cmd.push_back(CMD_BUTCHER);
@@ -2808,7 +2808,7 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
#endif
break;
- case TUT_OFFER_CORPSE:
+ case HINT_OFFER_CORPSE:
if (!god_likes_fresh_corpses(you.religion)
|| you.hunger_state < HS_SATIATED)
{
@@ -2822,14 +2822,14 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
cmd.push_back(CMD_PRAY);
break;
- case TUT_SHIFT_RUN:
+ case HINT_SHIFT_RUN:
text << "Walking around takes fewer keystrokes if you press "
"<w>Shift-direction</w> or <w>/ direction</w>. "
"That will let you run until a monster comes into sight or "
"your character sees something interesting.";
break;
- case TUT_MAP_VIEW:
+ case HINT_MAP_VIEW:
text << "As you explore a level, orientation can become difficult. "
"Press <w>%</w> to bring up the level map. Typing <w>?</w> "
"shows the list of level map commands. "
@@ -2846,8 +2846,8 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
#endif
break;
- case TUT_AUTO_EXPLORE:
- if (!Tutorial.tut_explored)
+ case HINT_AUTO_EXPLORE:
+ if (!Hints.hints_explored)
return;
text << "Fully exploring a level and picking up all the interesting "
@@ -2857,10 +2857,10 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
"up interesting items, and stop if a monster or interesting "
"dungeon feature (stairs, altar, etc.) is encountered.";
cmd.push_back(CMD_EXPLORE);
- Tutorial.tut_explored = false;
+ Hints.hints_explored = false;
break;
- case TUT_DONE_EXPLORE:
+ case HINT_DONE_EXPLORE:
// XXX: You'll only get this message if you're using auto exploration.
text << "Hey, you've finished exploring the dungeon on this level! "
"You can search for stairs from the level map (<w>%</w>) "
@@ -2869,7 +2869,7 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
"character can move there, too. ";
cmd.push_back(CMD_DISPLAY_MAP);
- if (Tutorial.tutorial_events[TUT_SEEN_STAIRS])
+ if (Hints.hints_events[HINT_SEEN_STAIRS])
{
text << "In rare cases, you may have found no downstairs at all. "
"Try searching for secret doors in suspicious looking "
@@ -2903,16 +2903,16 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
cmd.push_back(CMD_REST);
break;
- case TUT_AUTO_EXCLUSION:
+ case HINT_AUTO_EXCLUSION:
// In the highly unlikely case the player encounters a
// hostile statue or oklob plant during the tutorial...
- if (Tutorial.tut_explored)
+ if (Hints.hints_explored)
{
- // Hack: Reset tut_just_triggered, to force recursive calling of
+ // Hack: Reset hints_just_triggered, to force recursive calling of
// learned_something_new().
- Tutorial.tut_just_triggered = false;
- learned_something_new(TUT_AUTO_EXPLORE);
- Tutorial.tut_just_triggered = true;
+ Hints.hints_just_triggered = false;
+ learned_something_new(HINT_AUTO_EXPLORE);
+ Hints.hints_just_triggered = true;
}
text << "\nTo prevent autotravel or autoexplore taking you into "
"dangerous territory, you can set travel exclusions by "
@@ -2930,7 +2930,7 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
cmd.push_back(CMD_DISPLAY_MAP);
break;
- case TUT_NEED_HEALING:
+ case HINT_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. Ideally, you should "
"retreat to an area you've already explored and cleared "
@@ -2945,7 +2945,7 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
cmd.push_back(CMD_REST);
break;
- case TUT_NEED_POISON_HEALING:
+ case HINT_NEED_POISON_HEALING:
text << "Your poisoning could easily kill you, so now would be a "
"good time to <w>%</w>uaff a potion of heal wounds or, "
"better yet, a potion of healing. If you have seen neither "
@@ -2954,7 +2954,7 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
cmd.push_back(CMD_QUAFF);
break;
- case TUT_INVISIBLE_DANGER:
+ case HINT_INVISIBLE_DANGER:
text << "Fighting against a monster you cannot see is difficult. "
"Your best bet is probably a strategic retreat, be it via "
"teleportation or by getting off the level. "
@@ -2962,22 +2962,22 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
"make it easier for you to hit it.";
// To prevent this text being immediately followed by the next one...
- Tutorial.tut_last_healed = you.num_turns - 30;
+ Hints.hints_last_healed = you.num_turns - 30;
break;
- case TUT_NEED_HEALING_INVIS:
+ case HINT_NEED_HEALING_INVIS:
text << "You recently noticed an invisible monster, so unless you "
"killed it or left the scene resting might not be safe. If you "
"still need to replenish your hitpoints or magic, you'll have "
"to quaff an appropriate potion. For normal resting you will "
"first have to get away from the danger.";
- Tutorial.tut_last_healed = you.num_turns;
+ Hints.hints_last_healed = you.num_turns;
break;
- case TUT_CAN_BERSERK:
+ case HINT_CAN_BERSERK:
// Don't print this information if the player already knows it.
- if (Tutorial.tut_berserk_counter)
+ if (Hints.hints_berserk_counter)
return;
text << "Against particularly difficult foes, you should use your "
@@ -2986,7 +2986,7 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
cmd.push_back(CMD_USE_ABILITY);
break;
- case TUT_POSTBERSERK:
+ case HINT_POSTBERSERK:
text << "Berserking is extremely exhausting! It burns a lot of "
"nutrition, and afterwards you are slowed down and "
"occasionally even pass out. Press <w>%</w> to see your "
@@ -2994,7 +2994,7 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
cmd.push_back(CMD_DISPLAY_CHARACTER_STATUS);
break;
- case TUT_RUN_AWAY:
+ case HINT_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 "
@@ -3026,7 +3026,7 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
}
break;
- case TUT_RETREAT_CASTER:
+ case HINT_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.";
@@ -3038,7 +3038,7 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
}
break;
- case TUT_YOU_MUTATED:
+ case HINT_YOU_MUTATED:
text << "Mutations can be obtained from several sources, among them "
"potions, spell miscasts, and overuse of strong enchantments "
"like invisibility. The only reliable way to get rid of "
@@ -3048,7 +3048,7 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
cmd.push_back(CMD_DISPLAY_MUTATIONS);
break;
- case TUT_NEW_ABILITY_GOD:
+ case HINT_NEW_ABILITY_GOD:
switch (you.religion)
{
// Gods where first granted ability is active.
@@ -3073,13 +3073,13 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
}
break;
- case TUT_NEW_ABILITY_MUT:
+ case HINT_NEW_ABILITY_MUT:
text << "That mutation granted you a new ability. Press <w>%</w> to "
"take a look at your abilities or to use one of them.";
cmd.push_back(CMD_USE_ABILITY);
break;
- case TUT_NEW_ABILITY_ITEM:
+ case HINT_NEW_ABILITY_ITEM:
text << "That item you just equipped granted you a new ability "
"(un-equipping the item will remove the ability). "
"Press <w>%</w> to take a look at your abilities or to "
@@ -3087,11 +3087,11 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
cmd.push_back(CMD_USE_ABILITY);
break;
- case TUT_CONVERT:
+ case HINT_CONVERT:
_new_god_conduct();
break;
- case TUT_GOD_DISPLEASED:
+ case HINT_GOD_DISPLEASED:
text << "Uh-oh, " << god_name(you.religion) << " is growing "
"displeased because your piety is running low. Possibly this "
"is the case because you're committing heretic acts";
@@ -3115,7 +3115,7 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
cmd.push_back(CMD_DISPLAY_RELIGION);
break;
- case TUT_EXCOMMUNICATE:
+ case HINT_EXCOMMUNICATE:
{
const god_type new_god = (god_type) gc.x;
const int old_piety = gc.y;
@@ -3218,7 +3218,7 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
break;
}
- case TUT_WIELD_WEAPON:
+ case HINT_WIELD_WEAPON:
{
int wpn = you.equip[EQ_WEAPON];
if (wpn != -1
@@ -3226,12 +3226,12 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
&& you.inv[wpn].cursed())
{
// Don't trigger if the wielded weapon is cursed.
- Tutorial.tutorial_events[seen_what] = true;
- Tutorial.tutorial_left++;
+ Hints.hints_events[seen_what] = true;
+ Hints.hints_left++;
return;
}
- if (Tutorial.tutorial_type == TUT_RANGER_CHAR && wpn != -1
+ if (Hints.hints_type == HINT_RANGER_CHAR && wpn != -1
&& you.inv[wpn].base_type == OBJ_WEAPONS
&& you.inv[wpn].sub_type == WPN_BOW)
{
@@ -3249,8 +3249,8 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
}
break;
}
- case TUT_FLEEING_MONSTER:
- if (Tutorial.tutorial_type != TUT_BERSERK_CHAR)
+ case HINT_FLEEING_MONSTER:
+ if (Hints.hints_type != HINT_BERSERK_CHAR)
return;
text << "Now that monster is scared of you! Note that you do not "
@@ -3262,7 +3262,7 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
cmd.push_back(CMD_DISPLAY_INVENTORY);
break;
- case TUT_MONSTER_BRAND:
+ case HINT_MONSTER_BRAND:
#ifdef USE_TILE
tiles.place_cursor(CURSOR_TUTORIAL, gc);
if (const monsters *m = monster_at(gc))
@@ -3278,7 +3278,7 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
#endif
break;
- case TUT_MONSTER_FRIENDLY:
+ case HINT_MONSTER_FRIENDLY:
{
const monsters *m = monster_at(gc);
@@ -3305,7 +3305,7 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
break;
}
- case TUT_MONSTER_SHOUT:
+ case HINT_MONSTER_SHOUT:
{
const monsters* m = monster_at(gc);
@@ -3316,7 +3316,7 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
// them.
if (mons_class_flag(m->type, M_NO_EXP_GAIN))
{
- Tutorial.tutorial_events[TUT_MONSTER_SHOUT] = true;
+ Hints.hints_events[HINT_MONSTER_SHOUT] = true;
return;
}
@@ -3355,7 +3355,7 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
break;
}
- case TUT_MONSTER_LEFT_LOS:
+ case HINT_MONSTER_LEFT_LOS:
{
const monsters* m = monster_at(gc);
@@ -3369,12 +3369,12 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
break;
}
- case TUT_SEEN_MONSTER:
- case TUT_SEEN_FIRST_OBJECT:
+ case HINT_SEEN_MONSTER:
+ case HINT_SEEN_FIRST_OBJECT:
// Handled in special functions.
break;
- case TUT_SEEN_TOADSTOOL:
+ case HINT_SEEN_TOADSTOOL:
{
const monsters* m = monster_at(gc);
@@ -3388,7 +3388,7 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
break;
}
- case TUT_SEEN_ZERO_EXP_MON:
+ case HINT_SEEN_ZERO_EXP_MON:
{
const monsters* m = monster_at(gc);
@@ -3414,7 +3414,7 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
break;
}
- case TUT_ABYSS:
+ case HINT_ABYSS:
text << "Uh-oh, you've wound up in the Abyss! The Abyss is a special "
"place where you cannot remember or map where you've been; it "
"is filled with nasty monsters, and you're probably going to "
@@ -3434,7 +3434,7 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
"the exit if you keep heading solely in a compass direction.";
break;
- case TUT_SPELL_MISCAST:
+ case HINT_SPELL_MISCAST:
{
text << "You just miscast a spell. ";
@@ -3466,7 +3466,7 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
"of MP and nutrition that a successfully cast spell would.";
break;
}
- case TUT_SPELL_HUNGER:
+ case HINT_SPELL_HUNGER:
text << "The spell you just cast made you hungrier; you can see how "
"hungry spells make you by "
#ifdef USE_TILE
@@ -3481,7 +3481,7 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
cmd.push_back(CMD_DISPLAY_SPELLS);
break;
- case TUT_GLOWING:
+ case HINT_GLOWING:
text << "You've accumulated so much magical contamination that you're "
"glowing! You usually acquire magical contamination from using "
"some powerful magics, like invisibility, haste or potions of "
@@ -3506,7 +3506,7 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
"noticeable.";
break;
- case TUT_YOU_RESIST:
+ case HINT_YOU_RESIST:
text << "There are many dangers in Crawl. Luckily, there are ways to "
"(at least partially) resist some of them, if you are "
"fortunate enough to find them. There are two basic variants "
@@ -3526,20 +3526,20 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
#endif
break;
- case TUT_CAUGHT_IN_NET:
+ case HINT_CAUGHT_IN_NET:
text << "While you are held in a net, you cannot move around or engage "
"monsters in combat. Instead, any movement you take is counted "
"as an attempt to struggle free from the net. With a wielded "
"bladed weapon you will be able to cut the net faster";
- if (Tutorial.tutorial_type == TUT_BERSERK_CHAR)
+ if (Hints.hints_type == HINT_BERSERK_CHAR)
text << ", especially if you're berserking while doing so";
text << ". Small species may also wriggle out of a net, only damaging "
"it a bit, so as to then <w>%</w>ire it at a monster.";
cmd.push_back(CMD_FIRE);
- if (Tutorial.tutorial_type == TUT_MAGIC_CHAR)
+ if (Hints.hints_type == HINT_MAGIC_CHAR)
{
text << " Note that casting spells is still very much possible, "
"as is using wands, scrolls and potions.";
@@ -3551,7 +3551,7 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
}
break;
- case TUT_YOU_SILENCE:
+ case HINT_YOU_SILENCE:
redraw_screen();
text << "While you are silenced, you cannot cast spells, read scrolls "
"or use divine invocations. The same is true for any monster "
@@ -3567,7 +3567,7 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
"only one affected, before the effect fades entirely.";
break;
- case TUT_LOAD_SAVED_GAME:
+ case HINT_LOAD_SAVED_GAME:
{
text << "Welcome back! If it's been a while since you last played this "
"character, you should take some time to refresh your memory "
@@ -3587,7 +3587,7 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
listed.push_back("your <w>%</w>bilities");
cmd.push_back(CMD_USE_ABILITY);
}
- if (Tutorial.tutorial_type != TUT_MAGIC_CHAR || how_mutated())
+ if (Hints.hints_type != HINT_MAGIC_CHAR || how_mutated())
{
listed.push_back("your set of mutations (<w>%</w>)");
cmd.push_back(CMD_DISPLAY_MUTATIONS);
@@ -3631,7 +3631,7 @@ void learned_something_new(tutorial_event_type seen_what, coord_def gc)
}
}
-formatted_string tut_abilities_info()
+formatted_string hints_abilities_info()
{
std::ostringstream text;
text << "<" << colour_to_str(channel_to_colour(MSGCH_TUTORIAL)) << ">";
@@ -3640,7 +3640,7 @@ formatted_string tut_abilities_info()
"way of mutations. Activation of an ability usually comes at a cost, "
"e.g. nutrition or Magic power. Press '<w>!</w>' or '<w>?</w>' to "
"toggle between ability selection and description.";
- linebreak_string2(broken, _get_tutorial_cols());
+ linebreak_string2(broken, _get_hints_cols());
text << broken;
text << "</" << colour_to_str(channel_to_colour(MSGCH_TUTORIAL)) << ">";
@@ -3650,7 +3650,7 @@ formatted_string tut_abilities_info()
// Explains the basics of the skill screen. Don't bother the player with the
// aptitude information. (Toggling is still possible, of course.)
-void print_tut_skills_info()
+void print_hints_skills_info()
{
textcolor(channel_to_colour(MSGCH_TUTORIAL));
std::ostringstream text;
@@ -3662,14 +3662,14 @@ void print_tut_skills_info()
"pressing their slot letters. A <darkgrey>greyish</darkgrey> skill "
"will increase at a decidedly slower rate and ease training of others. "
"Press <w>?</w> to read your skills' descriptions.";
- linebreak_string2(broken, _get_tutorial_cols());
+ linebreak_string2(broken, _get_hints_cols());
text << broken;
text << "</" << colour_to_str(channel_to_colour(MSGCH_TUTORIAL)) << ">";
formatted_string::parse_string(text.str(), false).display();
}
-void print_tut_skills_description_info()
+void print_hints_skills_description_info()
{
textcolor(channel_to_colour(MSGCH_TUTORIAL));
std::ostringstream text;
@@ -3679,7 +3679,7 @@ void print_tut_skills_description_info()
"or press <w>?</w> again to return to the skill "
"selection.";
- linebreak_string2(broken, _get_tutorial_cols());
+ linebreak_string2(broken, _get_hints_cols());
text << broken;
text << "</" << colour_to_str(channel_to_colour(MSGCH_TUTORIAL)) << ">";
@@ -3687,7 +3687,7 @@ void print_tut_skills_description_info()
}
// A short explanation of Crawl's target mode and its most important commands.
-static std::string _tut_target_mode(bool spells = false)
+static std::string _hints_target_mode(bool spells = false)
{
std::string result;
result = "then be taken to target mode with the nearest monster or "
@@ -3715,7 +3715,7 @@ static std::string _tut_target_mode(bool spells = false)
return (result);
}
-static std::string _tut_abilities(const item_def& item)
+static std::string _hints_abilities(const item_def& item)
{
std::string str = "To do this, ";
@@ -3751,7 +3751,7 @@ static std::string _tut_abilities(const item_def& item)
return (str);
}
-static std::string _tut_throw_stuff(const item_def &item)
+static std::string _hints_throw_stuff(const item_def &item)
{
std::string result;
@@ -3763,7 +3763,7 @@ static std::string _tut_throw_stuff(const item_def &item)
result += item_base_name(item);
result += (item.quantity > 1? "s" : "");
result += ". You'll ";
- result += _tut_target_mode();
+ result += _hints_target_mode();
insert_commands(result, CMD_FIRE, 0);
return (result);
@@ -3776,7 +3776,7 @@ static std::string _tut_throw_stuff(const item_def &item)
// if they are evokable or grant resistances.
// In any case, check whether we still have enough space for the
// inscription prompt and answer.
-void tutorial_describe_item(const item_def &item)
+void hints_describe_item(const item_def &item)
{
std::ostringstream ostr;
ostr << "<" << colour_to_str(channel_to_colour(MSGCH_TUTORIAL)) << ">";
@@ -3794,7 +3794,7 @@ void tutorial_describe_item(const item_def &item)
// You can activate it.
ostr << "When wielded, some weapons (such as this one) "
"offer certain abilities you can activate. ";
- ostr << _tut_abilities(item);
+ ostr << _hints_abilities(item);
break;
}
else if (gives_resistance(item)
@@ -3880,7 +3880,7 @@ void tutorial_describe_item(const item_def &item)
ostr << "you only need to "
"<w>%</w>ire the appropriate type of ammunition. "
"You'll ";
- ostr << _tut_target_mode();
+ ostr << _hints_target_mode();
cmd.push_back(CMD_FIRE);
}
else
@@ -3894,7 +3894,7 @@ void tutorial_describe_item(const item_def &item)
ostr << "\n\nSome weapons (including this one), can also be "
"<w>%</w>ired. ";
cmd.push_back(CMD_FIRE);
- ostr << _tut_throw_stuff(item);
+ ostr << _hints_throw_stuff(item);
long_text = true;
}
if (!item_type_known(item)
@@ -3907,7 +3907,7 @@ void tutorial_describe_item(const item_def &item)
<< "The rarer the description, the greater the potential "
<< "value of an item.";
- Tutorial.tutorial_events[TUT_SEEN_RANDART] = false;
+ Hints.hints_events[HINT_SEEN_RANDART] = false;
}
if (item_known_cursed( item ) && !long_text)
{
@@ -3919,9 +3919,9 @@ void tutorial_describe_item(const item_def &item)
if (!wielded && is_throwable(&you, item))
ostr << " (Throwing it is safe, though.)";
- Tutorial.tutorial_events[TUT_YOU_CURSED] = false;
+ Hints.hints_events[HINT_YOU_CURSED] = false;
}
- Tutorial.tutorial_events[TUT_SEEN_WEAPON] = false;
+ Hints.hints_events[HINT_SEEN_WEAPON] = false;
break;
}
case OBJ_MISSILES:
@@ -3929,7 +3929,7 @@ void tutorial_describe_item(const item_def &item)
{
ostr << item.name(DESC_CAP_YOUR)
<< " can be <w>%</w>ired without the use of a launcher. ";
- ostr << _tut_throw_stuff(item);
+ ostr << _hints_throw_stuff(item);
cmd.push_back(CMD_FIRE);
}
else if (is_launched(&you, you.weapon(), item))
@@ -3953,7 +3953,7 @@ void tutorial_describe_item(const item_def &item)
<< " " << item.name(DESC_BASENAME)
<< (item.quantity > 1? "s" : "")
<< ". You'll ";
- ostr << _tut_target_mode();
+ ostr << _hints_target_mode();
cmd.push_back(CMD_FIRE);
}
else
@@ -3966,7 +3966,7 @@ void tutorial_describe_item(const item_def &item)
"launcher.";
cmd.push_back(CMD_WIELD_WEAPON);
}
- Tutorial.tutorial_events[TUT_SEEN_MISSILES] = false;
+ Hints.hints_events[HINT_SEEN_MISSILES] = false;
break;
case OBJ_ARMOUR:
@@ -4011,7 +4011,7 @@ void tutorial_describe_item(const item_def &item)
cmd.push_back(CMD_REMOVE_ARMOUR);
}
- if (Tutorial.tutorial_type == TUT_MAGIC_CHAR
+ if (Hints.hints_type == HINT_MAGIC_CHAR
&& get_armour_slot(item) == EQ_BODY_ARMOUR
&& !is_effectively_light_armour(&item))
{
@@ -4021,14 +4021,14 @@ void tutorial_describe_item(const item_def &item)
"elven armour will be generally safe for any aspiring "
"spellcaster.";
}
- else if (Tutorial.tutorial_type == TUT_MAGIC_CHAR
+ else if (Hints.hints_type == HINT_MAGIC_CHAR
&& is_shield(item))
{
ostr << "\nNote that shields will hinder you ability to "
"cast spells; the larger the shield, the bigger "
"the penalty.";
}
- else if (Tutorial.tutorial_type == TUT_RANGER_CHAR
+ else if (Hints.hints_type == HINT_RANGER_CHAR
&& is_shield(item))
{
ostr << "\nNote that wearing a shield will greatly decrease "
@@ -4045,7 +4045,7 @@ void tutorial_describe_item(const item_def &item)
<< "The rarer the description, the greater the potential "
<< "value of an item.";
- Tutorial.tutorial_events[TUT_SEEN_RANDART] = false;
+ Hints.hints_events[HINT_SEEN_RANDART] = false;
}
if (wearable)
{
@@ -4073,11 +4073,11 @@ void tutorial_describe_item(const item_def &item)
ostr << "\n\nWhen worn, some types of armour (such as "
"this one) offer certain <w>%</w>bilities you can "
"activate. ";
- ostr << _tut_abilities(item);
+ ostr << _hints_abilities(item);
cmd.push_back(CMD_USE_ABILITY);
}
}
- Tutorial.tutorial_events[TUT_SEEN_ARMOUR] = false;
+ Hints.hints_events[HINT_SEEN_ARMOUR] = false;
break;
}
case OBJ_WANDS:
@@ -4098,7 +4098,7 @@ void tutorial_describe_item(const item_def &item)
"<w>left mouse click</w> on the wand tile and then "
"<w>left mouse click</w> on your target.";
#endif
- Tutorial.tutorial_events[TUT_SEEN_WAND] = false;
+ Hints.hints_events[HINT_SEEN_WAND] = false;
break;
case OBJ_FOOD:
@@ -4139,7 +4139,7 @@ void tutorial_describe_item(const item_def &item)
}
}
}
- Tutorial.tutorial_events[TUT_SEEN_FOOD] = false;
+ Hints.hints_events[HINT_SEEN_FOOD] = false;
break;
case OBJ_SCROLLS:
@@ -4150,7 +4150,7 @@ void tutorial_describe_item(const item_def &item)
".";
cmd.push_back(CMD_READ);
- Tutorial.tutorial_events[TUT_SEEN_SCROLL] = false;
+ Hints.hints_events[HINT_SEEN_SCROLL] = false;
break;
case OBJ_JEWELLERY:
@@ -4191,9 +4191,9 @@ void tutorial_describe_item(const item_def &item)
ostr << "\n\nWhen worn, some types of jewellery (such as this "
"one) offer certain <w>%</w>bilities you can activate. ";
cmd.push_back(CMD_USE_ABILITY);
- ostr << _tut_abilities(item);
+ ostr << _hints_abilities(item);
}
- Tutorial.tutorial_events[TUT_SEEN_JEWELLERY] = false;
+ Hints.hints_events[HINT_SEEN_JEWELLERY] = false;
break;
}
case OBJ_POTIONS:
@@ -4203,7 +4203,7 @@ void tutorial_describe_item(const item_def &item)
#endif
".";
cmd.push_back(CMD_QUAFF);
- Tutorial.tutorial_events[TUT_SEEN_POTION] = false;
+ Hints.hints_events[HINT_SEEN_POTION] = false;
break;
case OBJ_BOOKS:
@@ -4304,16 +4304,16 @@ void tutorial_describe_item(const item_def &item)
"spell, e.g. <w>a</w> (check with <w>?</w>). "
"For attack spells you'll ";
cmd.push_back(CMD_CAST_SPELL);
- ostr << _tut_target_mode(true);
+ ostr << _hints_target_mode(true);
}
}
}
ostr << "\n";
- Tutorial.tutorial_events[TUT_SEEN_SPBOOK] = false;
+ Hints.hints_events[HINT_SEEN_SPBOOK] = false;
break;
case OBJ_CORPSES:
- Tutorial.tutorial_events[TUT_SEEN_CARRION] = false;
+ Hints.hints_events[HINT_SEEN_CARRION] = false;
if (item.sub_type == CORPSE_SKELETON)
{
@@ -4449,7 +4449,7 @@ void tutorial_describe_item(const item_def &item)
cmd.push_back(CMD_DROP);
}
}
- Tutorial.tutorial_events[TUT_SEEN_STAFF] = false;
+ Hints.hints_events[HINT_SEEN_STAFF] = false;
break;
case OBJ_MISCELLANY:
@@ -4473,7 +4473,7 @@ void tutorial_describe_item(const item_def &item)
cmd.push_back(CMD_EVOKE);
}
- Tutorial.tutorial_events[TUT_SEEN_MISC] = false;
+ Hints.hints_events[HINT_SEEN_MISC] = false;
break;
default:
@@ -4484,12 +4484,12 @@ void tutorial_describe_item(const item_def &item)
std::string broken = ostr.str();
if (!cmd.empty())
insert_commands(broken, cmd);
- linebreak_string2(broken, _get_tutorial_cols());
+ linebreak_string2(broken, _get_hints_cols());
cgotoxy(1, wherey() + 2);
display_tagged_block(broken);
-} // tutorial_describe_item()
+} // hints_describe_item()
-void tutorial_inscription_info(bool autoinscribe, std::string prompt)
+void hints_inscription_info(bool autoinscribe, std::string prompt)
{
// Don't print anything if there's not enough space.
if (wherey() >= get_number_of_lines() - 1)
@@ -4534,14 +4534,14 @@ void tutorial_inscription_info(bool autoinscribe, std::string prompt)
// longer getting displayed.
// Players might still end up e'x'aming and particularly clicking on
// but it's a lot more hit'n'miss now.
-bool tutorial_pos_interesting(int x, int y)
+bool hints_pos_interesting(int x, int y)
{
return (cloud_type_at(coord_def(x, y)) != CLOUD_NONE
|| _water_is_disturbed(x, y)
- || _tutorial_feat_interesting(grd[x][y]));
+ || _hints_feat_interesting(grd[x][y]));
}
-static bool _tutorial_feat_interesting(dungeon_feature_type feat)
+static bool _hints_feat_interesting(dungeon_feature_type feat)
{
// Altars and branch entrances are always interesting.
if (feat >= DNGN_ALTAR_FIRST_GOD && feat <= DNGN_ALTAR_LAST_GOD)
@@ -4572,14 +4572,14 @@ static bool _tutorial_feat_interesting(dungeon_feature_type feat)
}
}
-void tutorial_describe_pos(int x, int y)
+void hints_describe_pos(int x, int y)
{
- _tutorial_describe_disturbance(x, y);
- _tutorial_describe_cloud(x, y);
- _tutorial_describe_feature(x, y);
+ _hints_describe_disturbance(x, y);
+ _hints_describe_cloud(x, y);
+ _hints_describe_feature(x, y);
}
-static void _tutorial_describe_feature(int x, int y)
+static void _hints_describe_feature(int x, int y)
{
const dungeon_feature_type feat = grd[x][y];
const coord_def where(x, y);
@@ -4621,7 +4621,7 @@ static void _tutorial_describe_feature(int x, int y)
"mechanical traps you can't avoid tripping them "
"by levitating or flying over them.";
}
- Tutorial.tutorial_events[TUT_SEEN_TRAP] = false;
+ Hints.hints_events[HINT_SEEN_TRAP] = false;
break;
case DNGN_TRAP_NATURAL: // only shafts for now
@@ -4631,7 +4631,7 @@ static void _tutorial_describe_feature(int x, int y)
"if you're levitating or flying.\n"
"If you want to jump down there, use <w>></w> to do so. "
"Be warned that getting back here might be difficult.";
- Tutorial.tutorial_events[TUT_SEEN_TRAP] = false;
+ Hints.hints_events[HINT_SEEN_TRAP] = false;
break;
case DNGN_STONE_STAIRS_DOWN_I:
@@ -4652,7 +4652,7 @@ static void _tutorial_describe_feature(int x, int y)
"set of stairs. ";
}
- Tutorial.tutorial_events[TUT_SEEN_STAIRS] = false;
+ Hints.hints_events[HINT_SEEN_STAIRS] = false;
break;
case DNGN_STONE_STAIRS_UP_I:
@@ -4685,7 +4685,7 @@ static void _tutorial_describe_feature(int x, int y)
"particular set of stairs. ";
}
}
- Tutorial.tutorial_events[TUT_SEEN_STAIRS] = false;
+ Hints.hints_events[HINT_SEEN_STAIRS] = false;
break;
case DNGN_ESCAPE_HATCH_DOWN:
@@ -4694,17 +4694,17 @@ static void _tutorial_describe_feature(int x, int y)
"<w><<</w> and <w>></w>, respectively. Note that you will "
"usually be unable to return right away.";
- Tutorial.tutorial_events[TUT_SEEN_ESCAPE_HATCH] = false;
+ Hints.hints_events[HINT_SEEN_ESCAPE_HATCH] = false;
break;
case DNGN_ENTER_PORTAL_VAULT:
ostr << "This " << _describe_portal(where);
- Tutorial.tutorial_events[TUT_SEEN_PORTAL] = false;
+ Hints.hints_events[HINT_SEEN_PORTAL] = false;
break;
case DNGN_CLOSED_DOOR:
case DNGN_DETECTED_SECRET_DOOR:
- if (!Tutorial.tut_explored)
+ if (!Hints.hints_explored)
{
ostr << "\nTo avoid accidentally opening a door you'd rather "
"remain closed during travel or autoexplore, you can "
@@ -4786,7 +4786,7 @@ static void _tutorial_describe_feature(int x, int y)
#endif
".";
}
- Tutorial.tutorial_events[TUT_SEEN_ALTAR] = false;
+ Hints.hints_events[HINT_SEEN_ALTAR] = false;
break;
}
else if (feat >= DNGN_ENTER_FIRST_BRANCH
@@ -4822,11 +4822,11 @@ static void _tutorial_describe_feature(int x, int y)
ostr << "</" << colour_to_str(channel_to_colour(MSGCH_TUTORIAL)) << ">";
std::string broken = ostr.str();
- linebreak_string2(broken, _get_tutorial_cols());
+ linebreak_string2(broken, _get_hints_cols());
display_tagged_block(broken);
}
-static void _tutorial_describe_cloud(int x, int y)
+static void _hints_describe_cloud(int x, int y)
{
cloud_type ctype = cloud_type_at(coord_def(x, y));
if (ctype == CLOUD_NONE)
@@ -4884,11 +4884,11 @@ static void _tutorial_describe_cloud(int x, int y)
ostr << "</" << colour_to_str(channel_to_colour(MSGCH_TUTORIAL)) << ">";
std::string broken = ostr.str();
- linebreak_string2(broken, _get_tutorial_cols());
+ linebreak_string2(broken, _get_hints_cols());
display_tagged_block(broken);
}
-static void _tutorial_describe_disturbance(int x, int y)
+static void _hints_describe_disturbance(int x, int y)
{
if (!_water_is_disturbed(x, y))
return;
@@ -4906,7 +4906,7 @@ static void _tutorial_describe_disturbance(int x, int y)
ostr << "</" << colour_to_str(channel_to_colour(MSGCH_TUTORIAL)) << ">";
std::string broken = ostr.str();
- linebreak_string2(broken, _get_tutorial_cols());
+ linebreak_string2(broken, _get_hints_cols());
display_tagged_block(broken);
}
@@ -4921,7 +4921,7 @@ static bool _water_is_disturbed(int x, int y)
return (!mon->visible_to(&you) && !mons_flies(mon));
}
-bool tutorial_monster_interesting(const monsters *mons)
+bool hints_monster_interesting(const monsters *mons)
{
if (mons_is_unique(mons->type) || mons->type == MONS_PLAYER_GHOST)
return (true);
@@ -4939,7 +4939,7 @@ bool tutorial_monster_interesting(const monsters *mons)
return (false);
}
-void tutorial_describe_monster(const monsters *mons, bool has_stat_desc)
+void hints_describe_monster(const monsters *mons, bool has_stat_desc)
{
std::ostringstream ostr;
ostr << "\n\n<" << colour_to_str(channel_to_colour(MSGCH_TUTORIAL)) << ">";
@@ -5017,7 +5017,7 @@ void tutorial_describe_monster(const monsters *mons, bool has_stat_desc)
}
else if (dangerous)
{
- if (!Tutorial.tut_explored && mons->foe != MHITYOU)
+ if (!Hints.hints_explored && mons->foe != MHITYOU)
{
ostr << "You can easily mark its square as dangerous to avoid "
"accidentally entering into its field of view when using "
@@ -5070,28 +5070,28 @@ void tutorial_describe_monster(const monsters *mons, bool has_stat_desc)
ostr << "</" << colour_to_str(channel_to_colour(MSGCH_TUTORIAL)) << ">";
std::string broken = ostr.str();
- linebreak_string2(broken, _get_tutorial_cols());
+ linebreak_string2(broken, _get_hints_cols());
display_tagged_block(broken);
}
-void tutorial_observe_cell(const coord_def& gc)
+void hints_observe_cell(const coord_def& gc)
{
if (feat_is_escape_hatch(grd(gc)))
- learned_something_new(TUT_SEEN_ESCAPE_HATCH, gc);
+ learned_something_new(HINT_SEEN_ESCAPE_HATCH, gc);
else if (feat_is_branch_stairs(grd(gc)))
- learned_something_new(TUT_SEEN_BRANCH, gc);
+ learned_something_new(HINT_SEEN_BRANCH, gc);
else if (is_feature('>', gc))
- learned_something_new(TUT_SEEN_STAIRS, gc);
+ learned_something_new(HINT_SEEN_STAIRS, gc);
else if (is_feature('_', gc))
- learned_something_new(TUT_SEEN_ALTAR, gc);
+ learned_something_new(HINT_SEEN_ALTAR, gc);
else if (is_feature('^', gc))
- learned_something_new(TUT_SEEN_TRAP, gc);
+ learned_something_new(HINT_SEEN_TRAP, gc);
else if (feat_is_closed_door(grd(gc)))
- learned_something_new(TUT_SEEN_DOOR, gc);
+ learned_something_new(HINT_SEEN_DOOR, gc);
else if (grd(gc) == DNGN_ENTER_SHOP)
- learned_something_new(TUT_SEEN_SHOP, gc);
+ learned_something_new(HINT_SEEN_SHOP, gc);
else if (grd(gc) == DNGN_ENTER_PORTAL_VAULT)
- learned_something_new(TUT_SEEN_PORTAL, gc);
+ learned_something_new(HINT_SEEN_PORTAL, gc);
const int it = you.visible_igrd(gc);
if (it != NON_ITEM)
@@ -5101,14 +5101,14 @@ void tutorial_observe_cell(const coord_def& gc)
if (Options.feature_item_brand != CHATTR_NORMAL
&& (is_feature('>', gc) || is_feature('<', gc)))
{
- learned_something_new(TUT_STAIR_BRAND, gc);
+ learned_something_new(HINT_STAIR_BRAND, gc);
}
else if (Options.trap_item_brand != CHATTR_NORMAL
&& is_feature('^', gc))
{
- learned_something_new(TUT_TRAP_BRAND, gc);
+ learned_something_new(HINT_TRAP_BRAND, gc);
}
else if (Options.heap_brand != CHATTR_NORMAL && item.link != NON_ITEM)
- learned_something_new(TUT_HEAP_BRAND, gc);
+ learned_something_new(HINT_HEAP_BRAND, gc);
}
}
diff --git a/crawl-ref/source/hints.h b/crawl-ref/source/hints.h
new file mode 100644
index 0000000000..3432d0ef8b
--- /dev/null
+++ b/crawl-ref/source/hints.h
@@ -0,0 +1,89 @@
+/*
+ * File: hints.h
+ * Summary: Stuff needed for hints mode
+ * Written by: j-p-e-g
+ *
+ * Created on 2007-01-11.
+ */
+
+#ifndef HINTS_H
+#define HINTS_H
+
+#include <string>
+#include <vector>
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "externs.h"
+
+class formatted_string;
+class writer;
+class reader;
+
+enum hints_types
+{
+ HINT_BERSERK_CHAR,
+ HINT_MAGIC_CHAR,
+ HINT_RANGER_CHAR,
+ HINT_TYPES_NUM // 3
+};
+
+void save_hints(writer& outf);
+void load_hints(reader& inf);
+void init_hints_options(void);
+
+bool pick_hints(void);
+void hints_load_game(void);
+void print_hints_menu(unsigned int type);
+void hints_zap_secret_doors(void);
+
+formatted_string hints_starting_info2();
+void hints_starting_screen(void);
+void hints_new_turn();
+void hints_death_screen(void);
+void hints_finished(void);
+
+void hints_dissection_reminder(bool healthy);
+void hints_healing_reminder(void);
+
+void taken_new_item(unsigned char item_type);
+void hints_gained_new_skill(int skill);
+void hints_monster_seen(const monsters& mon);
+void hints_first_item(const item_def& item);
+void learned_something_new(hints_event_type seen_what,
+ coord_def gc = coord_def());
+formatted_string hints_abilities_info(void);
+void print_hints_skills_info(void);
+void print_hints_skills_description_info(void);
+
+// Additional information for tutorial players.
+void hints_describe_item(const item_def &item);
+void hints_inscription_info(bool autoinscribe, std::string prompt);
+bool hints_pos_interesting(int x, int y);
+void hints_describe_pos(int x, int y);
+bool hints_monster_interesting(const monsters *mons);
+void hints_describe_monster(const monsters *mons, bool has_stat_desc);
+
+void hints_observe_cell(const coord_def& gc);
+
+struct hints_state
+{
+ FixedVector<bool, 85> hints_events;
+ bool hints_explored;
+ bool hints_stashes;
+ bool hints_travel;
+ unsigned int hints_spell_counter;
+ unsigned int hints_throw_counter;
+ unsigned int hints_berserk_counter;
+ unsigned int hints_melee_counter;
+ unsigned int hints_last_healed;
+ unsigned int hints_seen_invisible;
+
+ bool hints_just_triggered;
+ unsigned int hints_type;
+ unsigned int hints_left;
+};
+
+extern hints_state Hints;
+
+#endif
diff --git a/crawl-ref/source/it_use2.cc b/crawl-ref/source/it_use2.cc
index dbc1770225..6f4abe805e 100644
--- a/crawl-ref/source/it_use2.cc
+++ b/crawl-ref/source/it_use2.cc
@@ -37,7 +37,7 @@
#include "stuff.h"
#include "terrain.h"
#include "transform.h"
-#include "tutorial.h"
+#include "hints.h"
#include "xom.h"
// From an actual potion, pow == 40 -- bwr
@@ -203,17 +203,17 @@ bool potion_effect(potion_type pot_eff, int pow, bool drank_it, bool was_known)
case POT_GAIN_STRENGTH:
if (mutate(MUT_STRONG, true, false, false, true))
- learned_something_new(TUT_YOU_MUTATED);
+ learned_something_new(HINT_YOU_MUTATED);
break;
case POT_GAIN_DEXTERITY:
if (mutate(MUT_AGILE, true, false, false, true))
- learned_something_new(TUT_YOU_MUTATED);
+ learned_something_new(HINT_YOU_MUTATED);
break;
case POT_GAIN_INTELLIGENCE:
if (mutate(MUT_CLEVER, true, false, false, true))
- learned_something_new(TUT_YOU_MUTATED);
+ learned_something_new(HINT_YOU_MUTATED);
break;
case POT_LEVITATION:
@@ -431,7 +431,7 @@ bool potion_effect(potion_type pot_eff, int pow, bool drank_it, bool was_known)
for (int i = 0; i < 3; i++)
mutate(RANDOM_MUTATION, false);
- learned_something_new(TUT_YOU_MUTATED);
+ learned_something_new(HINT_YOU_MUTATED);
did_god_conduct(DID_DELIBERATE_MUTATING, 10, was_known);
did_god_conduct(DID_STIMULANTS, 4 + random2(4), was_known);
break;
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc
index 4803cbee4f..07d4dc1b27 100644
--- a/crawl-ref/source/item_use.cc
+++ b/crawl-ref/source/item_use.cc
@@ -80,7 +80,7 @@
#include "teleport.h"
#include "transform.h"
#include "traps.h"
-#include "tutorial.h"
+#include "hints.h"
#include "view.h"
#include "shout.h"
#include "viewchar.h"
@@ -386,12 +386,12 @@ bool wield_weapon(bool auto_wield, int slot, bool show_weff_messages,
if (show_weff_messages)
wield_warning();
- if (Tutorial.tutorial_left)
+ if (Hints.hints_left)
{
if (new_wpn.cursed())
- learned_something_new(TUT_YOU_CURSED);
+ learned_something_new(HINT_YOU_CURSED);
else if (your_talents(false).size() > old_talents)
- learned_something_new(TUT_NEW_ABILITY_ITEM);
+ learned_something_new(HINT_NEW_ABILITY_ITEM);
}
// Time calculations.
@@ -3299,8 +3299,8 @@ bool throw_it(bolt &pbolt, int throw_2, bool teleport, int acc_bonus,
}
else
{
- if (Tutorial.tutorial_left)
- Tutorial.tut_throw_counter++;
+ if (Hints.hints_left)
+ Hints.hints_throw_counter++;
// Dropping item copy, since the launched item might be different.
pbolt.drop_item = !did_return;
@@ -3688,7 +3688,7 @@ void equip_jewellery_effect(item_def &item)
{
mprf("Oops, that %s feels deathly cold.",
jewellery_is_amulet(item)? "amulet" : "ring");
- learned_something_new(TUT_YOU_CURSED);
+ learned_something_new(HINT_YOU_CURSED);
int amusement = 32;
if (!known_cursed && !known_bad)
@@ -4011,8 +4011,8 @@ bool puton_item(int item_slot)
// Actually equip the item.
equip_item(hand_used, item_slot);
- if (Tutorial.tutorial_left && your_talents(false).size() > old_talents)
- learned_something_new(TUT_NEW_ABILITY_ITEM);
+ if (Hints.hints_left && your_talents(false).size() > old_talents)
+ learned_something_new(HINT_NEW_ABILITY_ITEM);
// Putting on jewellery is as fast as wielding weapons.
you.time_taken /= 2;
@@ -5566,7 +5566,7 @@ void read_scroll(int slot)
{
// Also sets wield_change.
do_curse_item( *you.weapon(), false );
- learned_something_new(TUT_YOU_CURSED);
+ learned_something_new(HINT_YOU_CURSED);
bad_effect = true;
}
break;
@@ -5710,7 +5710,7 @@ void read_scroll(int slot)
// Make the name before we curse it.
do_curse_item( you.inv[you.equip[affected]], false );
- learned_something_new(TUT_YOU_CURSED);
+ learned_something_new(HINT_YOU_CURSED);
bad_effect = true;
break;
}
diff --git a/crawl-ref/source/items.cc b/crawl-ref/source/items.cc
index 1086a9f455..112d4819f6 100644
--- a/crawl-ref/source/items.cc
+++ b/crawl-ref/source/items.cc
@@ -64,7 +64,7 @@
#include "state.h"
#include "terrain.h"
#include "travel.h"
-#include "tutorial.h"
+#include "hints.h"
#include "viewchar.h"
#include "viewgeom.h"
#include "xom.h"
@@ -742,7 +742,7 @@ void item_check(bool verbose)
strm << "There are many items here." << std::endl;
if (items.size() > 5)
- learned_something_new(TUT_MULTI_PICKUP);
+ learned_something_new(HINT_MULTI_PICKUP);
}
static void _pickup_menu(int item_link)
@@ -801,7 +801,7 @@ static void _pickup_menu(int item_link)
if (!pickup_warning.empty())
{
mpr(pickup_warning.c_str());
- learned_something_new(TUT_HEAVY_LOAD);
+ learned_something_new(HINT_HEAVY_LOAD);
}
if (n_did_pickup)
@@ -1145,13 +1145,13 @@ bool pickup_single_item(int link, int qty)
if (num == -1)
{
mpr("You can't carry that many items.");
- learned_something_new(TUT_HEAVY_LOAD);
+ learned_something_new(HINT_HEAVY_LOAD);
return (false);
}
else if (num == 0)
{
mpr("You can't carry that much weight.");
- learned_something_new(TUT_HEAVY_LOAD);
+ learned_something_new(HINT_HEAVY_LOAD);
return (false);
}
@@ -1526,7 +1526,7 @@ int move_item_to_player(int obj, int quant_got, bool quiet,
you.gold, you.gold != 1 ? "s" : "");
}
- learned_something_new(TUT_SEEN_GOLD);
+ learned_something_new(HINT_SEEN_GOLD);
you.turn_is_over = true;
return (retval);
@@ -1684,11 +1684,11 @@ int move_item_to_player(int obj, int quant_got, bool quiet,
mpr(get_menu_colour_prefix_tags(you.inv[freeslot],
DESC_INVENTORY).c_str());
}
- if (Tutorial.tutorial_left)
+ if (Hints.hints_left)
{
taken_new_item(item.base_type);
if (is_artefact(item) || get_equip_desc( item ) != ISFLAG_NO_DESC)
- learned_something_new(TUT_SEEN_RANDART);
+ learned_something_new(HINT_SEEN_RANDART);
}
if (item.base_type == OBJ_ORBS
diff --git a/crawl-ref/source/main.cc b/crawl-ref/source/main.cc
index 9b6988e177..67958855a2 100644
--- a/crawl-ref/source/main.cc
+++ b/crawl-ref/source/main.cc
@@ -121,7 +121,7 @@
#include "transform.h"
#include "traps.h"
#include "travel.h"
-#include "tutorial.h"
+#include "hints.h"
#include "view.h"
#include "shout.h"
#include "viewchar.h"
@@ -268,7 +268,7 @@ int main(int argc, char *argv[])
add_key_recorder(&repeat_again_rec);
// Override some options for tutorial.
- init_tutorial_options();
+ init_hints_options();
if (!crawl_state.game_is_tutorial())
{
@@ -303,12 +303,12 @@ int main(int argc, char *argv[])
if (game_start)
{
// TODO: convert this to the hints mode
- if (Tutorial.tutorial_left)
+ if (Hints.hints_left)
_startup_tutorial();
_take_starting_note();
}
else
- tutorial_load_game();
+ hints_load_game();
// Catch up on any experience levels we did not assign last time. This
// can happen if Crawl sees SIGHUP while it is waiting for the player
@@ -482,7 +482,7 @@ static void _take_starting_note()
static void _startup_tutorial()
{
// Don't allow triggering at game start.
- Tutorial.tut_just_triggered = true;
+ Hints.hints_just_triggered = true;
msg::streams(MSGCH_TUTORIAL)
<< "Press any key to start the tutorial intro, or Escape to skip it."
@@ -491,7 +491,7 @@ static void _startup_tutorial()
flush_prev_message();
const int ch = getch_ck();
if (ch != ESCAPE)
- tut_starting_screen();
+ hints_starting_screen();
}
#ifdef WIZARD
@@ -731,8 +731,8 @@ static void _handle_wizard_command(void)
// Set up the running variables for the current run.
static void _start_running(int dir, int mode)
{
- if (Tutorial.tutorial_events[TUT_SHIFT_RUN] && mode == RMODE_START)
- Tutorial.tutorial_events[TUT_SHIFT_RUN] = false;
+ if (Hints.hints_events[HINT_SHIFT_RUN] && mode == RMODE_START)
+ Hints.hints_events[HINT_SHIFT_RUN] = false;
if (i_feel_safe(true))
you.running.initialise(dir, mode);
@@ -1012,7 +1012,7 @@ static void _input()
update_monsters_in_view();
- tutorial_new_turn();
+ hints_new_turn();
if (you.cannot_act())
{
@@ -1536,8 +1536,8 @@ static void _do_clear_map()
static void _do_display_map()
{
- if (Tutorial.tutorial_events[TUT_MAP_VIEW])
- Tutorial.tutorial_events[TUT_MAP_VIEW] = false;
+ if (Hints.hints_events[HINT_MAP_VIEW])
+ Hints.hints_events[HINT_MAP_VIEW] = false;
#ifndef DEBUG_DIAGNOSTICS
if (!player_in_mappable_area())
@@ -1670,8 +1670,8 @@ void process_command(command_type cmd)
// Stash commands.
case CMD_SEARCH_STASHES:
- if (Tutorial.tut_stashes)
- Tutorial.tut_stashes = 0;
+ if (Hints.hints_stashes)
+ Hints.hints_stashes = 0;
StashTrack.search_stashes();
break;
@@ -1864,7 +1864,7 @@ void process_command(command_type cmd)
case CMD_NO_CMD:
default:
- if (Tutorial.tutorial_left)
+ if (Hints.hints_left)
{
std::string msg = "Unknown command. (For a list of commands type "
"<w>?\?<lightgrey>.)";
@@ -2309,8 +2309,8 @@ static void _decrement_durations()
you.increase_duration(DUR_EXHAUSTED, dur * 2);
// Don't trigger too many tutorial messages.
- const bool tut_slow = Tutorial.tutorial_events[TUT_YOU_ENCHANTED];
- Tutorial.tutorial_events[TUT_YOU_ENCHANTED] = false;
+ const bool hints_slow = Hints.hints_events[HINT_YOU_ENCHANTED];
+ Hints.hints_events[HINT_YOU_ENCHANTED] = false;
{
// Don't give duplicate 'You feel yourself slow down' messages.
@@ -2333,8 +2333,8 @@ static void _decrement_durations()
you.hp = (you.hp + 1) * 2 / 3;
calc_hp();
- learned_something_new(TUT_POSTBERSERK);
- Tutorial.tutorial_events[TUT_YOU_ENCHANTED] = tut_slow;
+ learned_something_new(HINT_POSTBERSERK);
+ Hints.hints_events[HINT_YOU_ENCHANTED] = hints_slow;
}
if (_decrement_a_duration(DUR_CORONA, delay))
@@ -2549,7 +2549,7 @@ void world_reacts()
}
#ifdef USE_TILE
- if (Tutorial.tutorial_left)
+ if (Hints.hints_left)
{
tiles.clear_text_tags(TAG_TUTORIAL);
tiles.place_cursor(CURSOR_TUTORIAL, Region::NO_CURSOR);
diff --git a/crawl-ref/source/makefile.obj b/crawl-ref/source/makefile.obj
index b5521d437d..cbd1394497 100644
--- a/crawl-ref/source/makefile.obj
+++ b/crawl-ref/source/makefile.obj
@@ -56,6 +56,7 @@ goditem.o \
godpassive.o \
godprayer.o \
godwrath.o \
+hints.o \
hiscores.o \
initfile.o \
invent.o \
@@ -190,7 +191,6 @@ terrain.o \
transform.o \
traps.o \
travel.o \
-tutorial.o \
view.o \
viewchar.o \
viewgeom.o \
diff --git a/crawl-ref/source/menu.cc b/crawl-ref/source/menu.cc
index 52167c0cd7..7f8b8242f0 100644
--- a/crawl-ref/source/menu.cc
+++ b/crawl-ref/source/menu.cc
@@ -17,7 +17,7 @@
#include "message.h"
#include "options.h"
#include "player.h"
-#include "tutorial.h"
+#include "hints.h"
#ifdef USE_TILE
#include "mon-stuff.h"
diff --git a/crawl-ref/source/message.cc b/crawl-ref/source/message.cc
index 826344cd1f..e1374c36af 100644
--- a/crawl-ref/source/message.cc
+++ b/crawl-ref/source/message.cc
@@ -35,7 +35,7 @@
#include "tags.h"
#include "tagstring.h"
#include "travel.h"
-#include "tutorial.h"
+#include "hints.h"
#include "view.h"
#include "shout.h"
#include "viewchar.h"
@@ -554,7 +554,7 @@ public:
{
cgotoxy(use_first_col() ? 2 : 1, last_row, GOTO_MSG);
textcolor(channel_to_colour(MSGCH_PROMPT));
- if (Tutorial.tutorial_left)
+ if (Hints.hints_left)
{
std::string more_str = "--more-- Press Space ";
#ifdef USE_TILE
diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc
index 231714394f..06db667a5a 100644
--- a/crawl-ref/source/misc.cc
+++ b/crawl-ref/source/misc.cc
@@ -87,7 +87,7 @@
#include "transform.h"
#include "traps.h"
#include "travel.h"
-#include "tutorial.h"
+#include "hints.h"
#include "view.h"
#include "viewgeom.h"
#include "shout.h"
@@ -1305,7 +1305,7 @@ void search_around(bool only_adjacent)
{
ptrap->reveal();
mpr("You found a trap!");
- learned_something_new(TUT_SEEN_TRAP, *ri);
+ learned_something_new(HINT_SEEN_TRAP, *ri);
exercise(SK_TRAPS_DOORS, (coinflip() ? 2 : 1));
}
else
@@ -1408,8 +1408,8 @@ bool go_berserk(bool intentional, bool potion)
return (false);
}
- if (Tutorial.tutorial_left)
- Tutorial.tut_berserk_counter++;
+ if (Hints.hints_left)
+ Hints.hints_berserk_counter++;
mpr("A red film seems to cover your vision as you go berserk!");
mpr("You feel yourself moving faster!");
@@ -1867,7 +1867,7 @@ void reveal_secret_door(const coord_def& p)
grd(p) = feat_is_opaque(door) ? DNGN_DETECTED_SECRET_DOOR
: DNGN_OPEN_DOOR;
viewwindow(false);
- learned_something_new(TUT_FOUND_SECRET_DOOR, p);
+ learned_something_new(HINT_FOUND_SECRET_DOOR, p);
// If a transparent secret door was forced open to preserve LOS,
// check if it had an opening prompt.
diff --git a/crawl-ref/source/mislead.cc b/crawl-ref/source/mislead.cc
index ea4a63ef9d..fbcd999618 100644
--- a/crawl-ref/source/mislead.cc
+++ b/crawl-ref/source/mislead.cc
@@ -13,7 +13,7 @@
#include "mon-util.h"
#include "view.h"
#include "random.h"
-#include "tutorial.h"
+#include "hints.h"
#include "xom.h"
bool unsuitable_misled_monster(monster_type mons)
@@ -116,7 +116,7 @@ void mons_cast_mislead(monsters *monster)
else
mpr("You are even more misled!", MSGCH_WARN);
- learned_something_new(TUT_YOU_ENCHANTED);
+ learned_something_new(HINT_YOU_ENCHANTED);
xom_is_stimulated((you.duration[DUR_MISLED] - old_value)
/ BASELINE_DELAY);
diff --git a/crawl-ref/source/mon-act.cc b/crawl-ref/source/mon-act.cc
index 8650ceca07..d52a2b6f8b 100644
--- a/crawl-ref/source/mon-act.cc
+++ b/crawl-ref/source/mon-act.cc
@@ -53,7 +53,7 @@
#include "stuff.h"
#include "terrain.h"
#include "traps.h"
-#include "tutorial.h"
+#include "hints.h"
#include "view.h"
#include "shout.h"
#include "viewchar.h"
@@ -2667,7 +2667,7 @@ static void _mons_open_door(monsters* monster, const coord_def &pos)
mprf("%s was actually a secret door!",
feature_description(grid, NUM_TRAPS, false,
DESC_CAP_THE, false).c_str());
- learned_something_new(TUT_FOUND_SECRET_DOOR, pos);
+ learned_something_new(HINT_FOUND_SECRET_DOOR, pos);
}
std::string open_str = "opens the ";
@@ -3125,10 +3125,10 @@ static bool _do_move_monster(monsters *monster, const coord_def& delta)
// this message to avoid confusion.
if (monster->seen_context == _just_seen && !you.see_cell(f))
simple_monster_message(monster, " moves out of view.");
- else if (Tutorial.tutorial_left && (monster->flags & MF_WAS_IN_VIEW)
+ else if (Hints.hints_left && (monster->flags & MF_WAS_IN_VIEW)
&& !you.see_cell(f))
{
- learned_something_new(TUT_MONSTER_LEFT_LOS, monster->pos());
+ learned_something_new(HINT_MONSTER_LEFT_LOS, monster->pos());
}
// The seen context no longer applies if the monster is moving normally.
diff --git a/crawl-ref/source/mon-behv.cc b/crawl-ref/source/mon-behv.cc
index f8f72f3e0e..18b8363dd4 100644
--- a/crawl-ref/source/mon-behv.cc
+++ b/crawl-ref/source/mon-behv.cc
@@ -24,7 +24,7 @@
#include "state.h"
#include "terrain.h"
#include "traps.h"
-#include "tutorial.h"
+#include "hints.h"
#include "view.h"
#include "shout.h"
@@ -909,7 +909,7 @@ void behaviour_event(monsters *mon, mon_event_type event, int src,
mon->foe = MHITYOU;
if (you.see_cell(mon->pos()))
- learned_something_new(TUT_FLEEING_MONSTER);
+ learned_something_new(HINT_FLEEING_MONSTER);
if (mon->type == MONS_KRAKEN)
{
diff --git a/crawl-ref/source/mon-cast.cc b/crawl-ref/source/mon-cast.cc
index 868c0acb5a..f61e58f669 100644
--- a/crawl-ref/source/mon-cast.cc
+++ b/crawl-ref/source/mon-cast.cc
@@ -27,7 +27,7 @@
#include "mon-place.h"
#include "mon-project.h"
#include "terrain.h"
-#include "tutorial.h"
+#include "hints.h"
#include "mislead.h"
#include "mgen_data.h"
#include "coord.h"
diff --git a/crawl-ref/source/mon-stuff.cc b/crawl-ref/source/mon-stuff.cc
index 688293e09a..97439c8f1b 100644
--- a/crawl-ref/source/mon-stuff.cc
+++ b/crawl-ref/source/mon-stuff.cc
@@ -58,7 +58,7 @@
#include "terrain.h"
#include "transform.h"
#include "traps.h"
-#include "tutorial.h"
+#include "hints.h"
#include "view.h"
#include "shout.h"
#include "spells3.h"
@@ -499,16 +499,16 @@ int place_monster_corpse(const monsters *monster, bool silent,
&& player_res_poison() <= 0);
if (o != NON_ITEM)
- tutorial_dissection_reminder(!poison);
+ hints_dissection_reminder(!poison);
}
return (o == NON_ITEM ? -1 : o);
}
-static void _tutorial_inspect_kill()
+static void _hints_inspect_kill()
{
- if (Tutorial.tutorial_events[TUT_KILLED_MONSTER])
- learned_something_new(TUT_KILLED_MONSTER);
+ if (Hints.hints_events[HINT_KILLED_MONSTER])
+ learned_something_new(HINT_KILLED_MONSTER);
}
#ifdef DGL_MILESTONES
@@ -1453,7 +1453,7 @@ int monster_die(monsters *monster, killer_type killer,
// Killing triggers tutorial lesson.
if (gives_xp)
- _tutorial_inspect_kill();
+ _hints_inspect_kill();
// Prevent summoned creatures from being good kills.
if (bad_kill || good_kill)
@@ -3459,8 +3459,8 @@ void seen_monster(monsters *monster)
if (!mons_is_mimic(monster->type))
{
- if (Tutorial.tutorial_left)
- tutorial_monster_seen(*monster);
+ if (Hints.hints_left)
+ hints_monster_seen(*monster);
if (MONST_INTERESTING(monster))
{
diff --git a/crawl-ref/source/monster.cc b/crawl-ref/source/monster.cc
index 7fafd05b91..9ea5e6a9c8 100644
--- a/crawl-ref/source/monster.cc
+++ b/crawl-ref/source/monster.cc
@@ -41,7 +41,7 @@
#include "stuff.h"
#include "terrain.h"
#include "traps.h"
-#include "tutorial.h"
+#include "hints.h"
#include "view.h"
#include "shout.h"
#include "xom.h"
@@ -4301,7 +4301,7 @@ void monsters::add_enchantment_effect(const mon_enchant &ench, bool quiet)
patrol_point.reset();
}
if (you.can_see(this))
- learned_something_new(TUT_MONSTER_FRIENDLY, pos());
+ learned_something_new(HINT_MONSTER_FRIENDLY, pos());
break;
default:
diff --git a/crawl-ref/source/mutation.cc b/crawl-ref/source/mutation.cc
index 602c601d75..4ad234209e 100644
--- a/crawl-ref/source/mutation.cc
+++ b/crawl-ref/source/mutation.cc
@@ -44,7 +44,7 @@
#include "skills2.h"
#include "stuff.h"
#include "transform.h"
-#include "tutorial.h"
+#include "hints.h"
#include "view.h"
#include "xom.h"
@@ -1159,8 +1159,8 @@ bool mutate(mutation_type which_mutation, bool failMsg,
take_note(Note(NOTE_GET_MUTATION, mutat, you.mutation[mutat]));
- if (Tutorial.tutorial_left && your_talents(false).size() > old_talents)
- learned_something_new(TUT_NEW_ABILITY_MUT);
+ if (Hints.hints_left && your_talents(false).size() > old_talents)
+ learned_something_new(HINT_NEW_ABILITY_MUT);
return (true);
}
diff --git a/crawl-ref/source/newgame.cc b/crawl-ref/source/newgame.cc
index b9710f605e..137a4c88e6 100644
--- a/crawl-ref/source/newgame.cc
+++ b/crawl-ref/source/newgame.cc
@@ -28,7 +28,7 @@
#include "species.h"
#include "state.h"
#include "stuff.h"
-#include "tutorial.h"
+#include "hints.h"
#ifdef USE_TILE
#include "tilereg-crt.h"
diff --git a/crawl-ref/source/ouch.cc b/crawl-ref/source/ouch.cc
index 41caa37a0d..3c349a27a7 100644
--- a/crawl-ref/source/ouch.cc
+++ b/crawl-ref/source/ouch.cc
@@ -67,7 +67,7 @@
#include "spells4.h"
#include "state.h"
#include "stuff.h"
-#include "tutorial.h"
+#include "hints.h"
#include "view.h"
#include "shout.h"
#include "xom.h"
@@ -1289,8 +1289,8 @@ void end_game(scorefile_entry &se)
flush_prev_message();
viewwindow(false); // don't do for leaving/winning characters
- if (Tutorial.tutorial_left)
- tutorial_death_screen();
+ if (Hints.hints_left)
+ hints_death_screen();
}
if (!dump_char(morgue_name(se.death_time), false, true, &se))
diff --git a/crawl-ref/source/player-stats.cc b/crawl-ref/source/player-stats.cc
index 12ddef9970..c2b54d6b04 100644
--- a/crawl-ref/source/player-stats.cc
+++ b/crawl-ref/source/player-stats.cc
@@ -12,7 +12,7 @@
#include "religion.h"
#include "state.h"
#include "transform.h"
-#include "tutorial.h"
+#include "hints.h"
char player::stat(stat_type s, bool nonneg) const
{
@@ -65,7 +65,7 @@ void attribute_increase()
{
mpr("Your experience leads to an increase in your attributes!",
MSGCH_INTRINSIC_GAIN);
- learned_something_new(TUT_CHOOSE_STAT);
+ learned_something_new(HINT_CHOOSE_STAT);
mpr("Increase (S)trength, (I)ntelligence, or (D)exterity? ", MSGCH_PROMPT);
while (true)
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc
index abe2f43813..c6eadc63fa 100644
--- a/crawl-ref/source/player.cc
+++ b/crawl-ref/source/player.cc
@@ -74,7 +74,7 @@
#include "transform.h"
#include "traps.h"
#include "travel.h"
-#include "tutorial.h"
+#include "hints.h"
#include "view.h"
#include "shout.h"
#include "viewgeom.h"
@@ -2403,7 +2403,7 @@ int burden_change(void)
if (old_burdenstate != you.burden_state)
{
mpr("You are being weighed down by all of your possessions.");
- learned_something_new(TUT_HEAVY_LOAD);
+ learned_something_new(HINT_HEAVY_LOAD);
}
}
else
@@ -2413,7 +2413,7 @@ int burden_change(void)
if (old_burdenstate != you.burden_state)
{
mpr("You are being crushed by all of your possessions.");
- learned_something_new(TUT_HEAVY_LOAD);
+ learned_something_new(HINT_HEAVY_LOAD);
}
}
@@ -3092,15 +3092,15 @@ void level_change(bool skip_attribute_increase)
xom_is_stimulated(16);
- learned_something_new(TUT_NEW_LEVEL);
+ learned_something_new(HINT_NEW_LEVEL);
}
redraw_skill(you.your_name, player_title());
// Increase tutorial time-out now that it's actually become useful
// for a longer time.
- if (Tutorial.tutorial_left && you.experience_level >= 7)
- tutorial_finished();
+ if (Hints.hints_left && you.experience_level >= 7)
+ hints_finished();
}
// Here's a question for you: does the ordering of mods make a difference?
@@ -4476,7 +4476,7 @@ void contaminate_player(int change, bool controlled, bool status_only)
return;
if (you.magic_contamination > 0)
- learned_something_new(TUT_GLOWING);
+ learned_something_new(HINT_GLOWING);
// Zin doesn't like mutations or mutagenic radiation.
if (you.religion == GOD_ZIN)
@@ -4527,7 +4527,7 @@ bool confuse_player(int amount, bool resistable)
mprf(MSGCH_WARN, "You are %sconfused.",
old_value > 0 ? "more " : "");
- learned_something_new(TUT_YOU_ENCHANTED);
+ learned_something_new(HINT_YOU_ENCHANTED);
xom_is_stimulated((you.duration[DUR_CONF] - old_value)
/ BASELINE_DELAY);
@@ -4586,7 +4586,7 @@ bool poison_player(int amount, std::string source, std::string source_aux,
mprf(MSGCH_WARN, "You are %spoisoned.",
old_value > 0 ? "more " : "");
- learned_something_new(TUT_YOU_POISON);
+ learned_something_new(HINT_YOU_POISON);
}
you.props["poisoner"] = source;
@@ -4779,7 +4779,7 @@ bool slow_player(int turns)
mpr("You feel as though you will be slow longer.");
you.increase_duration(DUR_SLOW, turns, threshold);
- learned_something_new(TUT_YOU_ENCHANTED);
+ learned_something_new(HINT_YOU_ENCHANTED);
}
return (true);
@@ -5928,7 +5928,7 @@ bool player::rot(actor *who, int amount, int immediate, bool quiet)
rotting += amount;
- learned_something_new(TUT_YOU_ROTTING);
+ learned_something_new(HINT_YOU_ROTTING);
}
if (one_chance_in(4))
@@ -6054,7 +6054,7 @@ bool player::sicken(int amount)
if (disease > 210 * BASELINE_DELAY)
disease = 210 * BASELINE_DELAY;
- learned_something_new(TUT_YOU_SICK);
+ learned_something_new(HINT_YOU_SICK);
return (true);
}
@@ -6197,7 +6197,7 @@ bool player::mutate()
{
if (::mutate(RANDOM_MUTATION))
{
- learned_something_new(TUT_YOU_MUTATED);
+ learned_something_new(HINT_YOU_MUTATED);
return (true);
}
}
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc
index 809dca51c8..4349755ce9 100644
--- a/crawl-ref/source/religion.cc
+++ b/crawl-ref/source/religion.cc
@@ -84,7 +84,7 @@
#include "stuff.h"
#include "terrain.h"
#include "transform.h"
-#include "tutorial.h"
+#include "hints.h"
#include "view.h"
#include "xom.h"
@@ -2600,7 +2600,7 @@ void gain_piety(int original_gain, bool all_at_once, bool force)
if (_abil_chg_message(god_gain_power_messages[you.religion][i],
"You can now %s."))
{
- learned_something_new(TUT_NEW_ABILITY_GOD);
+ learned_something_new(HINT_NEW_ABILITY_GOD);
}
if (you.religion == GOD_SHINING_ONE)
@@ -2850,7 +2850,7 @@ void lose_piety(int pgn)
end_prayer();
if (you.piety > 0 && you.piety <= 5)
- learned_something_new(TUT_GOD_DISPLEASED);
+ learned_something_new(HINT_GOD_DISPLEASED);
if (you.religion == GOD_BEOGH)
{
@@ -3099,7 +3099,7 @@ void excommunication(god_type new_god)
mpr("The divine host forsakes you.", MSGCH_MONSTER_ENCHANT);
// Evil hack.
- learned_something_new(TUT_EXCOMMUNICATE,
+ learned_something_new(HINT_EXCOMMUNICATE,
coord_def((int)new_god, old_piety));
}
@@ -3481,7 +3481,7 @@ void god_pitch(god_type which_god)
redraw_skill(you.your_name, player_title());
- learned_something_new(TUT_CONVERT);
+ learned_something_new(HINT_CONVERT);
}
bool god_hates_your_god(god_type god, god_type your_god)
diff --git a/crawl-ref/source/shout.cc b/crawl-ref/source/shout.cc
index 3a3ccf56c6..4185ba15ab 100644
--- a/crawl-ref/source/shout.cc
+++ b/crawl-ref/source/shout.cc
@@ -29,7 +29,7 @@
#include "state.h"
#include "stuff.h"
#include "areas.h"
-#include "tutorial.h"
+#include "hints.h"
#include "view.h"
#include <sstream>
@@ -291,8 +291,8 @@ void handle_monster_shouts(monsters* monster, bool force)
const int noise_level = get_shout_noise_level(s_type);
const bool heard = noisy(noise_level, monster->pos(), monster->mindex());
- if (Tutorial.tutorial_left && (heard || you.can_see(monster)))
- learned_something_new(TUT_MONSTER_SHOUT, monster->pos());
+ if (Hints.hints_left && (heard || you.can_see(monster)))
+ learned_something_new(HINT_MONSTER_SHOUT, monster->pos());
}
#ifdef WIZARD
diff --git a/crawl-ref/source/skills.cc b/crawl-ref/source/skills.cc
index d58adbacd3..c481e27eda 100644
--- a/crawl-ref/source/skills.cc
+++ b/crawl-ref/source/skills.cc
@@ -23,7 +23,7 @@
#include "spl-cast.h"
#include "sprint.h"
#include "state.h"
-#include "tutorial.h"
+#include "hints.h"
// MAX_COST_LIMIT is the maximum XP amount it will cost to raise a skill
@@ -295,7 +295,7 @@ void _gain_skill_level(skill_type exsk)
else if (you.skills[exsk] == 1)
{
mprf(MSGCH_INTRINSIC_GAIN, "You have gained %s skill!", skill_name(exsk));
- tut_gained_new_skill(exsk);
+ hints_gained_new_skill(exsk);
}
else
{
@@ -303,7 +303,7 @@ void _gain_skill_level(skill_type exsk)
skill_name(exsk), you.skills[exsk]);
}
- learned_something_new(TUT_SKILL_RAISE);
+ learned_something_new(HINT_SKILL_RAISE);
// Recalculate this skill's order for tie breaking skills
// at its new level. See skills2.cc::init_skill_order()
diff --git a/crawl-ref/source/skills2.cc b/crawl-ref/source/skills2.cc
index 5018b6f53d..9143591f63 100644
--- a/crawl-ref/source/skills2.cc
+++ b/crawl-ref/source/skills2.cc
@@ -28,7 +28,7 @@
#include "player-stats.h"
#include "species.h"
#include "stuff.h"
-#include "tutorial.h"
+#include "hints.h"
typedef std::string (*string_fn)();
typedef std::map<std::string, string_fn> skill_op_map;
@@ -1426,19 +1426,19 @@ static void _display_skill_table(bool show_aptitudes, bool show_description)
}
}
- if (Tutorial.tutorial_left)
+ if (Hints.hints_left)
{
if (show_description || maxln >= bottom_line - 5)
{
cgotoxy(1, bottom_line-2);
// Doesn't mention the toggle between progress/aptitudes.
- print_tut_skills_description_info();
+ print_hints_skills_description_info();
}
else
{
cgotoxy(1, bottom_line-5);
// Doesn't mention the toggle between progress/aptitudes.
- print_tut_skills_info();
+ print_hints_skills_info();
}
}
else
@@ -1505,7 +1505,7 @@ void show_skills()
{
// Show skill description.
show_description = !show_description;
- if (Tutorial.tutorial_left)
+ if (Hints.hints_left)
clrscr();
continue;
}
diff --git a/crawl-ref/source/spells4.cc b/crawl-ref/source/spells4.cc
index 74b3c21628..7facd10927 100644
--- a/crawl-ref/source/spells4.cc
+++ b/crawl-ref/source/spells4.cc
@@ -56,7 +56,7 @@
#include "terrain.h"
#include "transform.h"
#include "traps.h"
-#include "tutorial.h"
+#include "hints.h"
#include "view.h"
#include "shout.h"
#include "viewchar.h"
@@ -742,7 +742,7 @@ void cast_silence(int pow)
if (you.beheld())
you.update_beholders();
- learned_something_new(TUT_YOU_SILENCE);
+ learned_something_new(HINT_YOU_SILENCE);
}
static int _discharge_monsters(coord_def where, int pow, int, actor *)
diff --git a/crawl-ref/source/spl-cast.cc b/crawl-ref/source/spl-cast.cc
index 9f8b64c16c..e73616e025 100644
--- a/crawl-ref/source/spl-cast.cc
+++ b/crawl-ref/source/spl-cast.cc
@@ -59,7 +59,7 @@
#include "stuff.h"
#include "areas.h"
#include "transform.h"
-#include "tutorial.h"
+#include "hints.h"
#include "view.h"
#include "shout.h"
#include "colour.h"
@@ -536,8 +536,8 @@ void do_cast_spell_cmd(bool force)
return;
}
- if (Tutorial.tutorial_left)
- Tutorial.tut_spell_counter++;
+ if (Hints.hints_left)
+ Hints.hints_spell_counter++;
if (!cast_a_spell(!force))
flush_input_buffer(FLUSH_ON_FAILURE);
}
@@ -680,7 +680,7 @@ bool cast_a_spell(bool check_range, spell_type spell)
if (spellh > 0)
{
make_hungry(spellh, true);
- learned_something_new(TUT_SPELL_HUNGER);
+ learned_something_new(HINT_SPELL_HUNGER);
}
}
@@ -1202,7 +1202,7 @@ spret_type your_spells(spell_type spell, int powc, bool allow_fail)
mpr("You miscast the spell.");
flush_input_buffer(FLUSH_ON_FAILURE);
- learned_something_new(TUT_SPELL_MISCAST);
+ learned_something_new(HINT_SPELL_MISCAST);
if (you.religion == GOD_SIF_MUNA
&& !player_under_penance()
diff --git a/crawl-ref/source/stairs.cc b/crawl-ref/source/stairs.cc
index a807cd245e..3d1bdd0aa4 100644
--- a/crawl-ref/source/stairs.cc
+++ b/crawl-ref/source/stairs.cc
@@ -34,7 +34,7 @@
#include "terrain.h"
#include "traps.h"
#include "travel.h"
-#include "tutorial.h"
+#include "hints.h"
#include "view.h"
#include "viewchar.h"
#include "xom.h"
@@ -560,7 +560,7 @@ void up_stairs(dungeon_feature_type force_stair,
bool stay = (!yesno("Are you sure you want to leave the Dungeon?",
false, 'n') || !_check_carrying_orb());
- if (!stay && Tutorial.tutorial_left)
+ if (!stay && Hints.hints_left)
{
if (!yesno("Are you *sure*? Doing so will end the game!", false,
'n'))
@@ -1149,7 +1149,7 @@ void down_stairs( int old_level, dungeon_feature_type force_stair,
mpr("You feel Cheibriados slowing down the madness of this place.",
MSGCH_GOD, GOD_CHEIBRIADOS);
}
- learned_something_new(TUT_ABYSS);
+ learned_something_new(HINT_ABYSS);
break;
case LEVEL_PANDEMONIUM:
diff --git a/crawl-ref/source/startup.cc b/crawl-ref/source/startup.cc
index 878431e184..bb9874d60f 100644
--- a/crawl-ref/source/startup.cc
+++ b/crawl-ref/source/startup.cc
@@ -47,7 +47,7 @@
#include "stuff.h"
#include "options.h"
#include "terrain.h"
-#include "tutorial.h"
+#include "hints.h"
#include "view.h"
#include "viewchar.h"
@@ -277,11 +277,11 @@ void _post_init(bool newc)
// For a new game, wipe out monsters in LOS, and
// for new tutorial games also the items.
- zap_los_monsters(Tutorial.tutorial_events[TUT_SEEN_FIRST_OBJECT]);
+ zap_los_monsters(Hints.hints_events[HINT_SEEN_FIRST_OBJECT]);
// For a newly started tutorial, turn secret doors into normal ones.
- if (Tutorial.tutorial_left)
- tutorial_zap_secret_doors();
+ if (Hints.hints_left)
+ hints_zap_secret_doors();
}
#ifdef USE_TILE
diff --git a/crawl-ref/source/stash.cc b/crawl-ref/source/stash.cc
index fd6b62fae2..2edad64cd7 100644
--- a/crawl-ref/source/stash.cc
+++ b/crawl-ref/source/stash.cc
@@ -40,7 +40,7 @@
#include "terrain.h"
#include "traps.h"
#include "travel.h"
-#include "tutorial.h"
+#include "hints.h"
#include "viewgeom.h"
#include <cctype>
@@ -382,7 +382,7 @@ void Stash::update()
else
{
pitem = &mitm[you.visible_igrd(p)];
- tutorial_first_item(*pitem);
+ hints_first_item(*pitem);
}
const item_def& item = *pitem;
diff --git a/crawl-ref/source/state.cc b/crawl-ref/source/state.cc
index dbf98a1420..ec49d79f26 100644
--- a/crawl-ref/source/state.cc
+++ b/crawl-ref/source/state.cc
@@ -21,7 +21,7 @@
#include "religion.h"
#include "showsymb.h"
#include "state.h"
-#include "tutorial.h"
+#include "hints.h"
game_state::game_state()
: game_crashed(false), mouse_enabled(false), waiting_for_command(false),
@@ -222,8 +222,8 @@ bool interrupt_cmd_repeat( activity_interrupt_type ai,
mpr(text, MSGCH_WARN);
}
- if (Tutorial.tutorial_left)
- tutorial_monster_seen(*mon);
+ if (Hints.hints_left)
+ hints_monster_seen(*mon);
#else
formatted_string fs( channel_to_colour(MSGCH_WARN) );
fs.cprintf("%s (", mon->name(DESC_PLAIN, true).c_str());
diff --git a/crawl-ref/source/stuff.cc b/crawl-ref/source/stuff.cc
index 3781005a5b..f642dd8def 100644
--- a/crawl-ref/source/stuff.cc
+++ b/crawl-ref/source/stuff.cc
@@ -63,7 +63,7 @@
#include "output.h"
#include "player.h"
#include "religion.h"
-#include "tutorial.h"
+#include "hints.h"
#include "view.h"
stack_iterator::stack_iterator(const coord_def& pos, bool accessible)
@@ -609,7 +609,7 @@ void canned_msg(canned_message_type which_message)
break;
case MSG_YOU_RESIST:
mpr("You resist.");
- learned_something_new(TUT_YOU_RESIST);
+ learned_something_new(HINT_YOU_RESIST);
break;
case MSG_YOU_PARTIALLY_RESIST:
mpr("You partially resist.");
diff --git a/crawl-ref/source/traps.cc b/crawl-ref/source/traps.cc
index e04c06e1f9..51d7be4a19 100644
--- a/crawl-ref/source/traps.cc
+++ b/crawl-ref/source/traps.cc
@@ -42,7 +42,7 @@
#include "areas.h"
#include "terrain.h"
#include "transform.h"
-#include "tutorial.h"
+#include "hints.h"
#include "view.h"
#include "shout.h"
#include "xom.h"
@@ -704,7 +704,7 @@ void trap_def::trigger(actor& triggerer, bool flat_footed)
if (you_trigger)
{
- learned_something_new(TUT_SEEN_TRAP, p);
+ learned_something_new(HINT_SEEN_TRAP, p);
// Exercise T&D if the trap revealed itself, but not if it ran
// out of ammo.
diff --git a/crawl-ref/source/travel.cc b/crawl-ref/source/travel.cc
index 1e60aadc59..fd0a1ff76d 100644
--- a/crawl-ref/source/travel.cc
+++ b/crawl-ref/source/travel.cc
@@ -53,7 +53,7 @@
#endif
#include "traps.h"
#include "travel.h"
-#include "tutorial.h"
+#include "hints.h"
#include "view.h"
#include <algorithm>
@@ -783,7 +783,7 @@ static void _explore_find_target_square()
if (!estatus)
{
mpr("Done exploring.");
- learned_something_new(TUT_DONE_EXPLORE);
+ learned_something_new(HINT_DONE_EXPLORE);
}
else
{
@@ -2818,8 +2818,8 @@ void start_travel(const coord_def& p)
void start_explore(bool grab_items)
{
- if (Tutorial.tut_explored)
- Tutorial.tut_explored = false;
+ if (Hints.hints_explored)
+ Hints.hints_explored = false;
if (!player_in_mappable_area())
{
@@ -4056,7 +4056,7 @@ void explore_discoveries::add_item(const item_def &i)
// First item of this type?
// XXX: Only works when travelling.
- tutorial_first_item(i);
+ hints_first_item(i);
}
void explore_discoveries::found_item(const coord_def &pos, const item_def &i)
@@ -4181,8 +4181,8 @@ bool explore_discoveries::prompt_stop() const
void do_interlevel_travel()
{
- if (Tutorial.tut_travel)
- Tutorial.tut_travel = 0;
+ if (Hints.hints_travel)
+ Hints.hints_travel = 0;
if (!can_travel_interlevel())
{
diff --git a/crawl-ref/source/tutorial.h b/crawl-ref/source/tutorial.h
deleted file mode 100644
index b3e4c0f9db..0000000000
--- a/crawl-ref/source/tutorial.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * File: tutorial.h
- * Summary: Stuff needed for tutorial
- * Written by: j-p-e-g
- *
- * Created on 2007-01-11.
- */
-
-#ifndef TUTORIAL_H
-#define TUTORIAL_H
-
-#include <string>
-#include <vector>
-#include <stdio.h>
-#include <stdlib.h>
-
-#include "externs.h"
-
-class formatted_string;
-class writer;
-class reader;
-
-enum tutorial_types
-{
- TUT_BERSERK_CHAR,
- TUT_MAGIC_CHAR,
- TUT_RANGER_CHAR,
- TUT_TYPES_NUM // 3
-};
-
-void save_tutorial(writer& outf);
-void load_tutorial(reader& inf);
-void init_tutorial_options(void);
-
-bool pick_tutorial(void);
-void tutorial_load_game(void);
-void print_tutorial_menu(unsigned int type);
-void tutorial_zap_secret_doors(void);
-
-formatted_string tut_starting_info2();
-void tut_starting_screen(void);
-void tutorial_new_turn();
-void tutorial_death_screen(void);
-void tutorial_finished(void);
-
-void tutorial_dissection_reminder(bool healthy);
-void tutorial_healing_reminder(void);
-
-void taken_new_item(unsigned char item_type);
-void tut_gained_new_skill(int skill);
-void tutorial_monster_seen(const monsters& mon);
-void tutorial_first_item(const item_def& item);
-void learned_something_new(tutorial_event_type seen_what,
- coord_def gc = coord_def());
-formatted_string tut_abilities_info(void);
-void print_tut_skills_info(void);
-void print_tut_skills_description_info(void);
-
-// Additional information for tutorial players.
-void tutorial_describe_item(const item_def &item);
-void tutorial_inscription_info(bool autoinscribe, std::string prompt);
-bool tutorial_pos_interesting(int x, int y);
-void tutorial_describe_pos(int x, int y);
-bool tutorial_monster_interesting(const monsters *mons);
-void tutorial_describe_monster(const monsters *mons, bool has_stat_desc);
-
-void tutorial_observe_cell(const coord_def& gc);
-
-struct tutorial_state
-{
- FixedVector<bool, 85> tutorial_events;
- bool tut_explored;
- bool tut_stashes;
- bool tut_travel;
- unsigned int tut_spell_counter;
- unsigned int tut_throw_counter;
- unsigned int tut_berserk_counter;
- unsigned int tut_melee_counter;
- unsigned int tut_last_healed;
- unsigned int tut_seen_invisible;
-
- bool tut_just_triggered;
- unsigned int tutorial_type;
- unsigned int tutorial_left;
-};
-
-extern tutorial_state Tutorial;
-
-#endif
diff --git a/crawl-ref/source/view.cc b/crawl-ref/source/view.cc
index 4cfb2d0861..d12a64e7be 100644
--- a/crawl-ref/source/view.cc
+++ b/crawl-ref/source/view.cc
@@ -65,7 +65,7 @@
#include "tilemcache.h"
#include "tilesdl.h"
#include "travel.h"
-#include "tutorial.h"
+#include "hints.h"
#include "xom.h"
#ifdef USE_TILE
@@ -728,8 +728,8 @@ static int player_view_update_at(const coord_def &gc)
}
// Print tutorial messages for features in LOS.
- if (Tutorial.tutorial_left)
- tutorial_observe_cell(gc);
+ if (Hints.hints_left)
+ hints_observe_cell(gc);
if (is_terrain_changed(gc) || !is_terrain_seen(gc))
ret |= UF_AFFECT_EXCLUDES;