summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crawl-ref/source/abl-show.cc23
-rw-r--r--crawl-ref/source/acr.cc6
-rw-r--r--crawl-ref/source/effects.cc45
-rw-r--r--crawl-ref/source/enum.h40
-rw-r--r--crawl-ref/source/externs.h2
-rw-r--r--crawl-ref/source/monstuff.cc15
-rw-r--r--crawl-ref/source/ouch.cc3
-rw-r--r--crawl-ref/source/religion.cc29
-rw-r--r--crawl-ref/source/spells2.cc58
-rw-r--r--crawl-ref/source/spells2.h1
-rw-r--r--crawl-ref/source/tutorial.cc133
-rw-r--r--crawl-ref/source/tutorial.h2
-rw-r--r--crawl-ref/source/view.cc9
13 files changed, 250 insertions, 116 deletions
diff --git a/crawl-ref/source/abl-show.cc b/crawl-ref/source/abl-show.cc
index 928290b2bb..ae53d55904 100644
--- a/crawl-ref/source/abl-show.cc
+++ b/crawl-ref/source/abl-show.cc
@@ -125,8 +125,8 @@ ability_type god_abilities[MAX_NUM_GODS][MAX_GOD_ABILITIES] =
ABIL_SIF_MUNA_FORGET_SPELL, ABIL_NON_ABILITY,
ABIL_NON_ABILITY, ABIL_NON_ABILITY },
// Trog
- { ABIL_TROG_BERSERK, ABIL_TROG_MIGHT, ABIL_NON_ABILITY,
- ABIL_TROG_HASTE_SELF, ABIL_NON_ABILITY },
+ { ABIL_TROG_BERSERK, ABIL_TROG_REGENERATION, ABIL_NON_ABILITY,
+ ABIL_TROG_BROTHERS_IN_ARMS, ABIL_NON_ABILITY },
// Nemelex
{ ABIL_NEMELEX_PEEK_DECK, ABIL_NEMELEX_DRAW_CARD,
ABIL_NEMELEX_TRIPLE_DRAW, ABIL_NON_ABILITY,
@@ -257,8 +257,8 @@ static const ability_def Ability_List[] =
// Trog
{ ABIL_TROG_BURN_BOOKS, "Burn Books", 0, 0, 10, 0, ABFLAG_NONE },
{ ABIL_TROG_BERSERK, "Berserk", 0, 0, 200, 0, ABFLAG_NONE },
- { ABIL_TROG_MIGHT, "Might", 0, 0, 200, 1, ABFLAG_NONE },
- { ABIL_TROG_HASTE_SELF, "Haste Self", 0, 0, 250, 3, ABFLAG_NONE },
+ { ABIL_TROG_REGENERATION, "Trog's Hand", 0, 0, 50, 1, ABFLAG_NONE },
+ { ABIL_TROG_BROTHERS_IN_ARMS, "Brothers in Arms", 0, 0, 100, 3, ABFLAG_NONE },
// Elyvilon
{ ABIL_ELYVILON_DESTROY_WEAPONS, "Destroy Weapons", 0, 0, 0, 0, ABFLAG_NONE },
@@ -637,12 +637,12 @@ static talent get_talent(ability_type ability, bool check_confused)
failure = 30 - you.piety; // starts at 0%
break;
- case ABIL_TROG_MIGHT: // piety >= 50
+ case ABIL_TROG_REGENERATION: // piety >= 50
invoc = true;
failure = 80 - you.piety; // starts at 30%
break;
- case ABIL_TROG_HASTE_SELF: // piety >= 100
+ case ABIL_TROG_BROTHERS_IN_ARMS: // piety >= 100
invoc = true;
failure = 160 - you.piety; // starts at 60%
break;
@@ -1496,14 +1496,14 @@ static bool do_ability(const ability_def& abil)
go_berserk(true);
break;
- case ABIL_TROG_MIGHT:
+ case ABIL_TROG_REGENERATION:
// Trog abilities don't use or train invocations.
- potion_effect( POT_MIGHT, 150 );
+ cast_regen(you.piety/2);
break;
- case ABIL_TROG_HASTE_SELF:
+ case ABIL_TROG_BROTHERS_IN_ARMS:
// Trog abilities don't use or train invocations.
- potion_effect( POT_SPEED, 150 );
+ summon_berserker();
break;
case ABIL_SIF_MUNA_FORGET_SPELL:
@@ -1836,7 +1836,10 @@ static void add_talent(std::vector<talent>& vec, const ability_type ability,
{
const talent t = get_talent(ability, check_confused);
if ( t.which != ABIL_NON_ABILITY )
+ {
vec.push_back(t);
+ learned_something_new(TUT_NEW_ABILITY);
+ }
}
std::vector<talent> your_talents( bool check_confused )
diff --git a/crawl-ref/source/acr.cc b/crawl-ref/source/acr.cc
index 7d4c2f91b3..e121d9f414 100644
--- a/crawl-ref/source/acr.cc
+++ b/crawl-ref/source/acr.cc
@@ -895,11 +895,11 @@ static void input()
if (Options.tut_just_triggered)
Options.tut_just_triggered = false;
+ if (Options.tutorial_events[TUT_RUN_AWAY] && 2*you.hp < you.hp_max )
+ learned_something_new(TUT_RUN_AWAY);
+
if ( i_feel_safe() )
{
- if (Options.tutorial_events[TUT_RUN_AWAY] && 2*you.hp < you.hp_max )
- learned_something_new(TUT_RUN_AWAY);
-
if (Options.tutorial_left)
{
if ( 2*you.hp < you.hp_max
diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc
index 66ce66797d..7df469dd70 100644
--- a/crawl-ref/source/effects.cc
+++ b/crawl-ref/source/effects.cc
@@ -1316,6 +1316,21 @@ bool acquirement(object_class_type class_wanted, int agent)
default:
break;
}
+
+ int plusmod = random2(4);
+ // more damage, less accuracy
+ if (agent == GOD_TROG)
+ {
+ thing.plus -= plusmod;
+ thing.plus2 += plusmod;
+ }
+ // more accuracy, less damage
+ else if (agent == GOD_OKAWARU)
+ {
+ thing.plus += plusmod;
+ thing.plus2 -= plusmod;
+ }
+
}
else if (thing.base_type == OBJ_ARMOUR
&& !is_fixed_artefact( thing ))
@@ -1497,18 +1512,22 @@ void yell(void)
mpr("What do you say?", MSGCH_PROMPT);
mprf(" ! - %s", cap_shout.c_str());
- mpr(" a - Order allies to attack a monster");
- if (!(you.prev_targ == MHITNOT || you.prev_targ == MHITYOU))
+ if (!you.duration[DUR_BERSERKER])
{
- struct monsters *target = &menv[you.prev_targ];
+ mpr(" a - Order allies to attack a monster");
- if (mons_near(target) && player_monster_visible(target))
+ if (!(you.prev_targ == MHITNOT || you.prev_targ == MHITYOU))
{
- mpr(" p - Order allies to attack your previous target");
- targ_prev = true;
+ struct monsters *target = &menv[you.prev_targ];
+
+ if (mons_near(target) && player_monster_visible(target))
+ {
+ mpr(" p - Order allies to attack your previous target");
+ targ_prev = true;
+ }
}
- }
+ }
mprf(" Anything else - Stay silent%s",
one_chance_in(20)? " (and be thought a fool)" : "");
@@ -1524,6 +1543,12 @@ void yell(void)
return;
case 'a':
+ if (you.duration[DUR_BERSERKER])
+ {
+ canned_msg(MSG_TOO_BERSERK);
+ return;
+ }
+
mpr("Gang up on whom?", MSGCH_PROMPT);
direction( targ, DIR_TARGET, TARG_ENEMY );
@@ -1544,6 +1569,12 @@ void yell(void)
break;
case 'p':
+ if (you.duration[DUR_BERSERKER])
+ {
+ canned_msg(MSG_TOO_BERSERK);
+ return;
+ }
+
if (targ_prev)
{
mons_targd = you.prev_targ;
diff --git a/crawl-ref/source/enum.h b/crawl-ref/source/enum.h
index 8a651cfeda..3de87c997b 100644
--- a/crawl-ref/source/enum.h
+++ b/crawl-ref/source/enum.h
@@ -92,20 +92,20 @@ enum ability_type
ABIL_YRED_DRAIN_LIFE,
ABIL_YRED_CONTROL_UNDEAD, // 144
// 160 - reserved for Vehumet
- ABIL_OKAWARU_MIGHT = 170, // 170
+ ABIL_OKAWARU_MIGHT = 170, // 170
// Okawaru no longer heals (JPEG)
- ABIL_OKAWARU_HASTE, // 172
+ ABIL_OKAWARU_HASTE = 172, // 172
ABIL_MAKHLEB_MINOR_DESTRUCTION = 180, // 180
ABIL_MAKHLEB_LESSER_SERVANT_OF_MAKHLEB,
ABIL_MAKHLEB_MAJOR_DESTRUCTION,
ABIL_MAKHLEB_GREATER_SERVANT_OF_MAKHLEB, // 183
ABIL_SIF_MUNA_CHANNEL_ENERGY = 190, // 190
ABIL_SIF_MUNA_FORGET_SPELL,
- ABIL_TROG_BURN_BOOKS,
+ ABIL_TROG_BURN_BOOKS = 199,
ABIL_TROG_BERSERK = 200, // 200
- ABIL_TROG_MIGHT,
- ABIL_TROG_HASTE_SELF, // 202
- ABIL_ELYVILON_DESTROY_WEAPONS,
+ ABIL_TROG_REGENERATION,
+ ABIL_TROG_BROTHERS_IN_ARMS, // 202
+ ABIL_ELYVILON_DESTROY_WEAPONS = 219,
ABIL_ELYVILON_LESSER_HEALING = 220, // 220
ABIL_ELYVILON_PURIFICATION,
ABIL_ELYVILON_HEALING,
@@ -3780,38 +3780,40 @@ enum tutorial_event_type
TUT_SEEN_CARRION,
// encountered dungeon features
TUT_SEEN_STAIRS,
- TUT_SEEN_TRAPS, // 15
+ TUT_SEEN_ESCAPE_HATCH, // 15
+ TUT_SEEN_TRAPS,
TUT_SEEN_ALTAR,
TUT_SEEN_SHOP,
TUT_SEEN_DOOR,
// other 'first events'
- TUT_SEEN_MONSTER,
- TUT_KILLED_MONSTER, // 20
+ TUT_SEEN_MONSTER, // 20
+ TUT_KILLED_MONSTER,
TUT_NEW_LEVEL,
TUT_SKILL_RAISE,
TUT_YOU_ENCHANTED,
- TUT_YOU_SICK,
- TUT_YOU_POISON, // 25
+ TUT_YOU_SICK, // 25
+ TUT_YOU_POISON,
TUT_YOU_CURSED,
TUT_YOU_HUNGRY,
TUT_YOU_STARVING,
- TUT_MULTI_PICKUP,
- TUT_HEAVY_LOAD, // 30
+ TUT_MULTI_PICKUP, // 30
+ TUT_HEAVY_LOAD,
TUT_ROTTEN_FOOD,
TUT_NEED_HEALING,
TUT_NEED_POISON_HEALING,
- TUT_RUN_AWAY,
- TUT_MAKE_CHUNKS, // 35
+ TUT_RUN_AWAY, // 35
+ TUT_MAKE_CHUNKS,
+ TUT_OFFER_CORPSE,
TUT_POSTBERSERK,
TUT_SHIFT_RUN,
- TUT_MAP_VIEW,
+ TUT_MAP_VIEW, // 40
TUT_DONE_EXPLORE,
- TUT_YOU_MUTATED, // 40
+ TUT_YOU_MUTATED,
TUT_NEW_ABILITY,
TUT_WIELD_WEAPON,
TUT_FLEEING_MONSTER,
- TUT_EVENTS_NUM // 44
-}; // for numbers higher than 45 change size of tutorial_events in externs.h
+ TUT_EVENTS_NUM // 46
+}; // for numbers higher than 48 change size of tutorial_events in externs.h
enum tutorial_types
{
diff --git a/crawl-ref/source/externs.h b/crawl-ref/source/externs.h
index 3f2114ac50..fd5794cfdd 100644
--- a/crawl-ref/source/externs.h
+++ b/crawl-ref/source/externs.h
@@ -1812,7 +1812,7 @@ public:
///////////////////////////////////////////////////////////////////////
// tutorial
- FixedVector<bool, 45> tutorial_events;
+ FixedVector<bool, 48> tutorial_events;
// bool tut_made_note;
bool tut_explored;
bool tut_stashes;
diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc
index 79b63d9752..20420c500c 100644
--- a/crawl-ref/source/monstuff.cc
+++ b/crawl-ref/source/monstuff.cc
@@ -322,22 +322,14 @@ static void place_monster_corpse(const monsters *monster)
// Don't care if 'o' is changed, and it shouldn't be (corpses don't stack)
move_item_to_grid( &o, monster->x, monster->y );
- if (you.hunger_state < HS_SATIATED && see_grid(monster->x, monster->y))
- learned_something_new(TUT_MAKE_CHUNKS);
+ if (see_grid(monster->x, monster->y))
+ tutorial_dissection_reminder();
} // end place_monster_corpse()
static void tutorial_inspect_kill()
{
if (Options.tutorial_events[TUT_KILLED_MONSTER])
learned_something_new(TUT_KILLED_MONSTER);
- else if (Options.tutorial_left
- && (you.religion == GOD_TROG
- || you.religion == GOD_OKAWARU
- || you.religion == GOD_MAKHLEB)
- && !you.duration[DUR_PRAYER])
- {
- tutorial_prayer_reminder();
- }
}
#ifdef DGL_MILESTONES
@@ -1591,7 +1583,8 @@ static void handle_behaviour(monsters *mon)
// set friendly target, if they don't already have one
if (isFriendly
&& you.pet_target != MHITNOT
- && (mon->foe == MHITNOT || mon->foe == MHITYOU))
+ && (mon->foe == MHITNOT || mon->foe == MHITYOU)
+ && !mon->has_ench(ENCH_BERSERK))
{
mon->foe = you.pet_target;
}
diff --git a/crawl-ref/source/ouch.cc b/crawl-ref/source/ouch.cc
index bace0db54d..62a3500289 100644
--- a/crawl-ref/source/ouch.cc
+++ b/crawl-ref/source/ouch.cc
@@ -903,7 +903,8 @@ void end_game( struct scorefile_entry &se )
int i;
bool dead = true;
- if (se.death_type == KILLED_BY_LEAVING ||
+ if (se.death_type == KILLED_BY_LEAVING ||
+ se.death_type == KILLED_BY_QUITTING ||
se.death_type == KILLED_BY_WINNING)
{
dead = false;
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc
index aa2f3161e7..d382cd7b9d 100644
--- a/crawl-ref/source/religion.cc
+++ b/crawl-ref/source/religion.cc
@@ -143,7 +143,7 @@ const char* god_gain_power_messages[MAX_NUM_GODS][MAX_GOD_ABILITIES] =
"", "" },
// Okawaru
{ "give your body great, but temporary strength",
- "call upon Okawaru for minor healing",
+ "",
"",
"",
"haste yourself" },
@@ -161,9 +161,9 @@ const char* god_gain_power_messages[MAX_NUM_GODS][MAX_GOD_ABILITIES] =
"" },
// Trog
{ "go berserk at will",
- "give your body great, but temporary, strength",
+ "call upon Trog for regeneration",
"",
- "haste yourself",
+ "call in reinforcement",
"" },
// Nemelex
{ "peek at the first card of a deck",
@@ -229,7 +229,7 @@ const char* god_lose_power_messages[MAX_NUM_GODS][MAX_GOD_ABILITIES] =
"" },
// Okawaru
{ "give your body great, but temporary strength",
- "call upon Okawaru for minor healing",
+ "",
"",
"",
"haste yourself" },
@@ -247,9 +247,9 @@ const char* god_lose_power_messages[MAX_NUM_GODS][MAX_GOD_ABILITIES] =
"" },
// Trog
{ "go berserk at will",
- "give your body great, but temporary, strength",
+ "call upon Trog for regeneration",
"",
- "haste yourself",
+ "call in reinforcement",
"" },
// Nemelex
{ "peek at the first card of a deck",
@@ -722,8 +722,6 @@ std::string god_prayer_reaction()
void pray()
{
- const bool was_praying = (you.duration[DUR_PRAYER] != 0);
-
if (silenced(you.x_pos, you.y_pos))
{
mpr("You are unable to make a sound!");
@@ -797,8 +795,6 @@ void pray()
mprf(MSGCH_DIAGNOSTICS, "piety: %d", you.piety );
#endif
- if (!was_praying)
- do_god_gift();
} // end pray()
const char *god_name( god_type which_god, bool long_name ) // mv - rewritten
@@ -1412,7 +1408,11 @@ void gain_piety(int pgn)
if (you.piety > 199
|| (you.piety > 150 && one_chance_in(3))
|| (you.piety > 100 && one_chance_in(3)))
+ {
+ if (you.piety > 150)
+ do_god_gift();
return;
+ }
}
else
{
@@ -2852,6 +2852,15 @@ void god_pitch(god_type which_god)
simple_god_message( info );
more();
+
+ if (you.religion == GOD_ELYVILON)
+ {
+ mpr("You can now call upon Elyvilon to destroy weapons lying on the ground.");
+ }
+ else if (you.religion == GOD_TROG)
+ {
+ mpr("You can now call upon Trog to burn books in your surroundings.");
+ }
if (you.worshipped[you.religion] < 100)
you.worshipped[you.religion]++;
diff --git a/crawl-ref/source/spells2.cc b/crawl-ref/source/spells2.cc
index fb93985dc0..a0a21181f3 100644
--- a/crawl-ref/source/spells2.cc
+++ b/crawl-ref/source/spells2.cc
@@ -1415,6 +1415,64 @@ void summon_ice_beast_etc(int pow, int ibc, bool divine_gift)
create_monster( ibc, numsc, beha, you.x_pos, you.y_pos, MHITYOU, 250 );
} // end summon_ice_beast_etc()
+// Trog sends some fighting buddies for his followers
+void summon_berserker()
+{
+ beh_type beha = BEH_GOD_GIFT;
+ int pow = you.piety + random2(you.piety/4) - random2(you.piety/4);
+ int numsc = std::min(2 + (random2(pow) / 4), 6);
+
+ int mon = MONS_TROLL;
+
+ if (pow <= 100)
+ { // bears
+ if (coinflip())
+ mon = MONS_BLACK_BEAR;
+ else
+ mon = MONS_GRIZZLY_BEAR;
+ }
+ else if (pow <= 140)
+ {
+ // ogres
+ if (one_chance_in(3))
+ mon = MONS_TWO_HEADED_OGRE;
+ else
+ mon = MONS_OGRE;
+ }
+ else if (pow <= 180)
+ {
+ // trolls
+ switch(random2(8))
+ {
+ case 0:
+ mon = MONS_DEEP_TROLL;
+ break;
+ case 1:
+ case 2:
+ mon = MONS_IRON_TROLL;
+ break;
+ case 3:
+ case 4:
+ mon = MONS_ROCK_TROLL;
+ break;
+ default:
+ mon = MONS_TROLL;
+ break;
+ }
+ }
+ else
+ {
+ // giants
+ if (coinflip())
+ mon = MONS_HILL_GIANT;
+ else
+ mon = MONS_STONE_GIANT;
+ }
+
+ int mons = create_monster( mon, numsc, beha, you.x_pos, you.y_pos, MHITYOU, 250 );
+ menv[mons].go_berserk(false);
+} // end summon_ice_beast_etc()
+
bool summon_swarm( int pow, bool unfriendly, bool god_gift )
{
int thing_called = MONS_PROGRAM_BUG; // error trapping {dlb}
diff --git a/crawl-ref/source/spells2.h b/crawl-ref/source/spells2.h
index 3a6c414625..f6a7cbb145 100644
--- a/crawl-ref/source/spells2.h
+++ b/crawl-ref/source/spells2.h
@@ -153,6 +153,7 @@ void summon_animals(int pow);
* *********************************************************************** */
void summon_small_mammals(int pow);
+void summon_berserker();
// last updated 24may2000 {dlb}
/* ***********************************************************************
diff --git a/crawl-ref/source/tutorial.cc b/crawl-ref/source/tutorial.cc
index 7bb9354b1d..851372175c 100644
--- a/crawl-ref/source/tutorial.cc
+++ b/crawl-ref/source/tutorial.cc
@@ -288,6 +288,8 @@ static std::string tut_debug_list(int event)
return "seen first monster";
case TUT_SEEN_STAIRS:
return "seen first stairs";
+ case TUT_SEEN_ESCAPE_HATCH:
+ return "seen first escape hatch";
case TUT_SEEN_TRAPS:
return "encountered a trap";
case TUT_SEEN_ALTAR:
@@ -316,6 +318,8 @@ static std::string tut_debug_list(int event)
return "were starving";
case TUT_MAKE_CHUNKS:
return "learned about chunks";
+ case TUT_OFFER_CORPSE:
+ return "learned about sacrifice";
case TUT_MULTI_PICKUP:
return "read about pickup menu";
case TUT_HEAVY_LOAD:
@@ -555,9 +559,7 @@ void tutorial_death_screen()
{
text = "Don't forget to go berserk when fighting particularly "
"difficult foes. It is risky, but makes you faster "
- "and beefier. Also try to pray prior to battles so that ";
- text += god_name(you.religion);
- text += " will soon feel like providing more abilities.";
+ "and beefier.";
}
else if (Options.tutorial_type == TUT_RANGER_CHAR
&& 2*Options.tut_throw_counter < Options.tut_melee_counter )
@@ -695,23 +697,34 @@ void tutorial_finished()
Options.tutorial_events.init(false);
}
-// occasionally remind religious characters of praying
-void tutorial_prayer_reminder()
+// occasionally remind religious characters of sacrifices
+void tutorial_dissection_reminder()
{
if (Options.tut_just_triggered)
return;
- if (coinflip()) // always would be too annoying
+ // when hungry, give appropriate message or at least don't suggest sacrifice
+ if (you.hunger_state < HS_SATIATED)
+ {
+ learned_something_new(TUT_MAKE_CHUNKS);
+ return;
+ }
+
+ if (!god_likes_butchery(you.religion))
+ return;
+
+ if (Options.tutorial_events[TUT_OFFER_CORPSE])
+ learned_something_new(TUT_OFFER_CORPSE);
+ else if (one_chance_in(8))
{
std::string text;
- text = "Remember to <w>p<magenta>ray before battle, so as to dedicate "
- "your kills to ";
- text += god_name(you.religion);
- text += ". Should the monster leave a corpse, consider "
- "<w>D<magenta>issecting it as a sacrifice to ";
+ text += "If you don't need to eat it, consider <w>D<magenta>issecting "
+ "this corpse under <w>p<magenta>rayer as a sacrifice to ";
text += god_name(you.religion);
- text += ", as well.";
+ text += ".";
+
print_formatted_paragraph(text, get_tutorial_cols(), MSGCH_TUTORIAL);
+ Options.tut_just_triggered = true;
}
}
@@ -992,11 +1005,12 @@ void learned_something_new(tutorial_event_type seen_what, int x, int y)
"is lying on the ground, you can <w>D<magenta>issect with a "
"sharp implement. Once hungry you can <w>e<magenta>at the "
"resulting chunks (though they may not be healthy).";
- if (Options.tutorial_type == TUT_BERSERK_CHAR)
+ if (god_likes_butchery(you.religion))
{
text << " During prayer you can offer corpses to "
<< god_name(you.religion)
- << " by dissecting them, as well.";
+ << " by dissecting them, as well. Note that the gods will not "
+ << "accept rotting flesh.";
}
break;
case TUT_SEEN_JEWELLERY:
@@ -1025,19 +1039,31 @@ void learned_something_new(tutorial_event_type seen_what, int x, int y)
break;
case TUT_SEEN_STAIRS:
if (you.num_turns < 1)
- return;
+ return;
object = env.show[ex][ey];
colour = env.show_col[ex][ey];
get_item_symbol( object, &ch, &colour );
- text << "The <w>" << colour_to_tag(colour) << static_cast<char>(ch)
+ text << "The " << colour_to_tag(colour) << static_cast<char>(ch)
<< "<magenta> are some downstairs. You can enter the next (deeper) "
"level by following them down (<w>><magenta>). To get back to "
"this level again, press <w><<<magenta> while standing on the "
"upstairs.";
break;
+ case TUT_SEEN_ESCAPE_HATCH:
+ object = env.show[ex][ey];
+ colour = env.show_col[ex][ey];
+ get_item_symbol( object, &ch, &colour );
+
+ text << "These " << colour_to_tag(colour) << static_cast<char>(ch);
+ if (ch == '<')
+ text << "<";
+ text << "<magenta> are some kind of escape hatch. You can use them to "
+ "quickly leave a level with <w><<<magenta> and <w>><magenta>, "
+ "respectively, but will usually be unable to return right away.";
+ break;
case TUT_SEEN_TRAPS:
object = env.show[ex][ey];
colour = env.show_col[ex][ey];
@@ -1085,13 +1111,11 @@ void learned_something_new(tutorial_event_type seen_what, int x, int y)
text << "with offensive magic will raise your Conjurations and "
"Spellcasting skills.";
- if (you.religion != GOD_NO_GOD)
- {
- text << "\nTo dedicate your kills to "
+ if (you.religion == GOD_TROG)
+ text << " Also, kills of living creatures are automatically "
+ "dedicated to "
<< god_name(you.religion)
- << " <w>p<magenta>ray before battle. Note that not all gods "
- "will be pleased about you doing this.";
- }
+ << ".";
break;
case TUT_NEW_LEVEL:
text << "Well done! Reaching a new experience level is always a nice "
@@ -1140,8 +1164,8 @@ void learned_something_new(tutorial_event_type seen_what, int x, int y)
case TUT_YOU_HUNGRY:
text << "There are two ways to overcome hunger: food you started "
"with or found, and selfmade chunks from corpses. To get the "
- "latter, all you need to do is <w>D<magenta> a corpse with a "
- "sharp implement. Your starting weapon will do nicely. "
+ "latter, all you need to do is <w>D<magenta>issect a corpse "
+ "with a sharp implement. Your starting weapon will do nicely. "
"Try to dine on chunks in order to save permanent food.";
break;
case TUT_YOU_STARVING:
@@ -1173,31 +1197,32 @@ void learned_something_new(tutorial_event_type seen_what, int x, int y)
text << "One or more of the chunks or corpses you carry has started to "
"rot. Few races can digest these safely, so you might just as "
"well <w>d<magenta>rop them now.";
- if (you.religion == GOD_TROG || you.religion == GOD_MAKHLEB ||
- you.religion == GOD_OKAWARU)
- {
- text << "\nIf it is a rotting corpse you carry now might be a good "
- "time to <w>d<magenta>rop and <w>D<magenta>issect it during "
- "prayer (<w>p<magenta>) as an offer to "
- << god_name(you.religion)
- << ".";
- }
break;
case TUT_MAKE_CHUNKS:
text << "How lucky! That monster left a corpse which you can now "
- "<w>D<magenta>issect. One or more chunks will appear that you can "
- "then <w>e<magenta>at. Beware that some chunks may be, "
+ "<w>D<magenta>issect. One or more chunks will appear that you "
+ "can then <w>e<magenta>at. Beware that some chunks may be, "
"sometimes or always, hazardous. Only experience can help "
"you here.";
-
- if (you.duration[DUR_PRAYER] &&
- (you.religion == GOD_OKAWARU || you.religion == GOD_MAKHLEB ||
- you.religion == GOD_TROG || you.religion == GOD_ELYVILON))
+ if (you.duration[DUR_PRAYER]
+ && (god_likes_butchery(you.religion)
+ || god_hates_butchery(you.religion)))
{
- text << "\nNote that dissection under prayer offers the corpse to "
+ text << "\nRemember, though, to wait until your prayer is over, or "
+ "the corpse will instead be sacrificed to "
<< god_name(you.religion)
- << " - check your god's attitude about this with <w>^<magenta>.";
+ << ".";
+ }
+ break;
+ case TUT_OFFER_CORPSE:
+ if (!god_likes_butchery(you.religion))
+ {
+ return;
}
+ text << "Hey, that monster left a corpse! If you don't need it for "
+ "food or other purposes, you can sacrifice it to "
+ << god_name(you.religion)
+ << " by <w>D<magenta>issecting it while <w>p<magenta>raying.";
break;
case TUT_SHIFT_RUN:
text << "Walking around takes less keystrokes if you press "
@@ -1256,9 +1281,9 @@ void learned_something_new(tutorial_event_type seen_what, int x, int y)
"use of some item might be a viable alternative to fighting on.";
if (you.species == SP_CENTAUR)
text << " As a four-legged centaur you are particularly quick - "
- "running is an option! ";
- if (Options.tutorial_type == TUT_BERSERK_CHAR && !you.duration[DUR_BERSERKER]
- && !you.hunger)
+ "running is an option!";
+ if (Options.tutorial_type == TUT_BERSERK_CHAR && you.religion == GOD_TROG
+ && !you.duration[DUR_BERSERKER] && you.hunger_state >= HS_SATIATED)
{
text << "\nAlso, with "
<< god_name(you.religion)
@@ -1320,18 +1345,24 @@ void learned_something_new(tutorial_event_type seen_what, int x, int y)
formatted_string tut_abilities_info()
{
- std::string text = "<magenta>"
+ std::ostringstream text;
+ text << "<magenta>"
"This screen shows your character's set of talents. You can gain new " EOL
"abilities via certain items, through religion or by way of mutations. " EOL
"Activation of an ability usually comes at a cost, e.g. nutrition or " EOL
"Magic power. ";
- if (you.religion == GOD_TROG)
+ if (you.religion != GOD_NO_GOD)
{
- text +=
- "<w>Renounce Religion<magenta> will make your character leave your god" EOL
- "(and usually anger said god), while <w>Berserk<magenta> temporarily increases your" EOL
- "damage output in melee fights.";
+ text <<
+ "<w>Renounce Religion<magenta> will make your character leave your god" EOL
+ "(and usually anger said god)";
+ if (you.religion == GOD_TROG)
+ {
+ text << ", while <w>Berserk<magenta> temporarily increases your" EOL
+ "damage output in melee fights";
+ }
+ text << ".";
}
- return formatted_string::parse_string(text, false);
+ return formatted_string::parse_string(text.str(), false);
}
diff --git a/crawl-ref/source/tutorial.h b/crawl-ref/source/tutorial.h
index e3d0d84f7a..3c93228cc7 100644
--- a/crawl-ref/source/tutorial.h
+++ b/crawl-ref/source/tutorial.h
@@ -29,7 +29,7 @@ void tut_starting_screen();
void tutorial_death_screen(void);
void tutorial_finished(void);
-void tutorial_prayer_reminder(void);
+void tutorial_dissection_reminder(void);
void tutorial_healing_reminder(void);
void taken_new_item(unsigned char item_type);
diff --git a/crawl-ref/source/view.cc b/crawl-ref/source/view.cc
index 536e5054b9..bc47c9c7eb 100644
--- a/crawl-ref/source/view.cc
+++ b/crawl-ref/source/view.cc
@@ -4053,8 +4053,13 @@ void viewwindow(bool draw_it, bool do_updates)
const int object = env.show(ep);
if (object)
{
- if (is_feature('>', gc.x, gc.y))
- learned_something_new(TUT_SEEN_STAIRS, gc.x, gc.y);
+ if ((grd(gc) == DNGN_ROCK_STAIRS_DOWN || grd(gc) == DNGN_ROCK_STAIRS_UP)
+ && see_grid( gc.x, gc.y ))
+ {
+ learned_something_new(TUT_SEEN_ESCAPE_HATCH, gc.x, gc.y);
+ }
+ else if (is_feature('>', gc.x, gc.y))
+ learned_something_new(TUT_SEEN_STAIRS, gc.x, gc.y);
else if (is_feature('_', gc.x, gc.y))
learned_something_new(TUT_SEEN_ALTAR, gc.x, gc.y);
else if (grd(gc) == DNGN_CLOSED_DOOR