summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2007-11-25 21:28:10 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2007-11-25 21:28:10 +0000
commit71fc85edf61aed46b589a2ee5bc7b8ef55c5cc77 (patch)
tree28605521888e8692c3b12133bd39916fd8d1d6e7 /crawl-ref/source
parentdb417e511fceb9c4f39cb8e563ef3308265af94b (diff)
downloadcrawl-ref-71fc85edf61aed46b589a2ee5bc7b8ef55c5cc77.tar.gz
crawl-ref-71fc85edf61aed46b589a2ee5bc7b8ef55c5cc77.zip
* A few corrections and changes to the tutorial.
* Reintroduce protection from harm while praying for Ely and Yred (This weakens Ely's healing effect in comparison to Zin and TSO, so maybe Ely should get both the 1/10 AND the prayer bonus.) * FR 1829904: add '%' shortcut to character selection menu git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2914 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source')
-rw-r--r--crawl-ref/source/describe.cc6
-rw-r--r--crawl-ref/source/newgame.cc14
-rw-r--r--crawl-ref/source/ouch.cc8
-rw-r--r--crawl-ref/source/tutorial.cc62
4 files changed, 47 insertions, 43 deletions
diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc
index 3d608592df..87e2f4991b 100644
--- a/crawl-ref/source/describe.cc
+++ b/crawl-ref/source/describe.cc
@@ -3402,10 +3402,7 @@ void describe_feature_wide(int x, int y)
print_description(desc);
if (Options.tutorial_left)
- {
- gotoxy(1, wherey() + 2);
tutorial_describe_feature(grd[x][y]);
- }
if ( getch() == 0 )
getch();
@@ -3821,10 +3818,7 @@ void describe_monsters(monsters& mons)
print_description(description.str());
if (Options.tutorial_left)
- {
- gotoxy(1, wherey() + 2);
tutorial_describe_monster(static_cast<const monsters*>(&mons));
- }
if (getch() == 0)
getch();
diff --git a/crawl-ref/source/newgame.cc b/crawl-ref/source/newgame.cc
index e3f4489a46..4690556c06 100644
--- a/crawl-ref/source/newgame.cc
+++ b/crawl-ref/source/newgame.cc
@@ -2836,7 +2836,7 @@ spec_query:
cprintf(" (Press T to enter a tutorial.)");
cprintf(EOL EOL);
textcolor( CYAN );
- cprintf("You can be: (Press ? for more information)");
+ cprintf("You can be: (Press ? for more information, %% for a list of aptitudes)");
cprintf(EOL EOL);
textcolor( LIGHTGREY );
@@ -2918,6 +2918,11 @@ spec_query:
list_commands(false, '1');
return choose_race();
}
+ else if ( keyn == '%' )
+ {
+ list_commands(false, '%');
+ return choose_race();
+ }
if ((keyn == '\r' || keyn == '\n') && Options.prev_race && prevraceok)
keyn = Options.prev_race;
@@ -3036,7 +3041,7 @@ job_query:
cprintf(EOL EOL);
textcolor( CYAN );
- cprintf("You can be: (Press ? for more information)" EOL EOL);
+ cprintf("You can be: (Press ? for more information, %% for a list of aptitudes)" EOL EOL);
textcolor( LIGHTGREY );
int j = 0;
@@ -3110,6 +3115,11 @@ job_query:
list_commands(false, '2');
return choose_class();
}
+ else if ( keyn == '%' )
+ {
+ list_commands(false, '%');
+ return choose_class();
+ }
if ((keyn == '\r' || keyn == '\n') && Options.prev_cls && prevclassok)
keyn = Options.prev_cls;
diff --git a/crawl-ref/source/ouch.cc b/crawl-ref/source/ouch.cc
index 6e6e35dffd..2459ee687c 100644
--- a/crawl-ref/source/ouch.cc
+++ b/crawl-ref/source/ouch.cc
@@ -785,10 +785,12 @@ void ouch( int dam, int death_source, kill_method_type death_type,
if (dam > -9000) // that is, a "death" caused by hp loss {dlb}
{
- if (god_protects_from_harm(you.religion))
+ if (dam >= you.hp && god_protects_from_harm(you.religion))
{
- if (dam >= you.hp
- && (one_chance_in(10) || you.piety > random2(1000)))
+ if ((you.religion == GOD_ZIN || you.religion == GOD_SHINING_ONE)
+ && (one_chance_in(10) || you.piety > random2(1000))
+ || (you.religion == GOD_ELYVILON || you.religion == GOD_YREDELEMNUL)
+ && you.duration[DUR_PRAYER] && random2(you.piety) >= 30)
{
simple_god_message( " protects you from harm!" );
return;
diff --git a/crawl-ref/source/tutorial.cc b/crawl-ref/source/tutorial.cc
index 60cbe65b79..879c72e06f 100644
--- a/crawl-ref/source/tutorial.cc
+++ b/crawl-ref/source/tutorial.cc
@@ -421,11 +421,11 @@ static formatted_string tutorial_map_intro()
std::string result;
result = "<magenta>"
- "What you see here is the typical Crawl screen. The upper left map "
- "shows your hero as the <white>@<magenta> in the center. The parts "
- "of the map you remember but cannot currently see will be greyed "
- "out."
- "</magenta>" EOL;
+ "What you see here is the typical Crawl screen. The upper left map "
+ "shows your hero as the <white>@<magenta> in the center. The parts "
+ "of the map you remember but cannot currently see will be greyed "
+ "out."
+ "</magenta>" EOL;
result += " --more-- Press <white>Escape</white> to skip the basics";
linebreak_string2(result,get_tutorial_cols());
@@ -499,7 +499,7 @@ static void tutorial_movement_info()
void tut_starting_screen()
{
- int x1, x2, y1, y2;
+ int y_pos;
int MAX_INFO = 4;
#ifdef TUTORIAL_DEBUG
MAX_INFO++;
@@ -508,26 +508,16 @@ void tut_starting_screen()
for (int i=0; i<=MAX_INFO; i++)
{
- x1 = 1; y1 = 1;
- x2 = get_tutorial_cols(); y2 = get_number_of_lines();
+ // map window (starts at 1) or message window (starts at 18)
+ y_pos = (i==1 || i==3 ? 18 : 1);
- if (i==1 || i==3)
- {
- y1 = 18; // message window
- }
- else if (i==2)
- {
- x2 = 40; // map window
- y2 = 18;
- }
+ gotoxy(1,y_pos);
if (i==0)
clrscr();
- gotoxy(x1,y1);
-
if (i==0)
- tut_starting_info(x2).display();
+ tut_starting_info(get_tutorial_cols()).display();
else if (i==1)
tutorial_map_intro().display();
else if (i==2)
@@ -540,7 +530,7 @@ void tut_starting_screen()
{
#ifdef TUTORIAL_DEBUG
clrscr();
- gotoxy(x1,y1);
+ gotoxy(1,y_pos);
tutorial_debug().display();
#else
continue;
@@ -1269,7 +1259,7 @@ void learned_something_new(tutorial_event_type seen_what, int x, int y)
"<w>e<magenta>at something quickly, or you'll die. The safest "
"way to deal with this is to simply eat something from your "
"inventory rather than wait for a monster to leave a corpse.";
-
+
if (Options.tutorial_type == TUT_MAGIC_CHAR)
text << "\nNote that you cannot cast spells while starving.";
break;
@@ -1277,7 +1267,7 @@ void learned_something_new(tutorial_event_type seen_what, int x, int y)
case TUT_MULTI_PICKUP:
text << "There's a more comfortable way to pick up several items at the "
"same time. If you press <w>,<magenta> or <w>g<magenta> twice "
- "you can choose items from a menu. This takes less keystrokes "
+ "you can choose items from a menu. This takes fewer keystrokes "
"but has no influence on the number of turns needed. Multi-pickup "
"will be interrupted by monsters or other dangerous events.";
break;
@@ -1330,7 +1320,7 @@ void learned_something_new(tutorial_event_type seen_what, int x, int y)
break;
case TUT_SHIFT_RUN:
- text << "Walking around takes less keystrokes if you press "
+ text << "Walking around takes fewer keystrokes if you press "
"<w>Shift-direction<magenta> or <w>/ <w>direction<magenta>. "
"That will let you run until a monster comes into sight or "
"your character sees something interesting.";
@@ -1971,7 +1961,7 @@ bool tutorial_feat_interesting(dungeon_feature_type feat)
void tutorial_describe_feature(dungeon_feature_type feat)
{
std::ostringstream ostr;
- ostr << "<magenta>";
+ ostr << "\n<magenta>";
switch (feat)
{
@@ -2111,8 +2101,12 @@ bool tutorial_monster_interesting(const monsters *mons)
return true;
// highlighted in some way
- if (get_mons_colour(mons) != mons->colour)
+ if (mons_friendly(mons) && Options.friend_brand != CHATTR_NORMAL
+ || mons_looks_stabbable(mons) && Options.stab_brand != CHATTR_NORMAL
+ || mons_looks_distracted(mons) && Options.may_stab_brand != CHATTR_NORMAL)
+ {
return true;
+ }
// monster is (seriously) out of depth
if (you.level_type == LEVEL_DUNGEON &&
@@ -2126,18 +2120,18 @@ bool tutorial_monster_interesting(const monsters *mons)
void tutorial_describe_monster(const monsters *mons)
{
std::ostringstream ostr;
- ostr << "<magenta>";
+ ostr << "\n\n<magenta>";
if (mons_is_unique(mons->type))
{
ostr << "Did you think you were the only adventurer in the dungeon? "
"Well, you thought wrong! These unique adversaries often "
- "possess skills that normal monster wouldn't, so be careful.";
+ "possess skills that normal monster wouldn't, so be careful.\n\n";
}
else if(mons->type == MONS_PLAYER_GHOST)
{
ostr << "The ghost of a deceased adventurer, it would like nothing "
- "better than to send you the same way.";
+ "better than to send you the same way.\n\n";
}
else
{
@@ -2153,7 +2147,7 @@ void tutorial_describe_monster(const monsters *mons)
<< " dangerous!\n\n";
}
}
-
+
if (mons->has_ench(ENCH_BERSERK))
ostr << "A berserking monster is bloodthirsty and fighting madly.\n";
@@ -2165,12 +2159,16 @@ void tutorial_describe_monster(const monsters *mons)
else if (Options.stab_brand != CHATTR_NORMAL
&& mons_looks_stabbable(mons))
{
- ostr << "Apparently it has not noticed you - yet.";
+ ostr << "Apparently "
+ << mons_pronoun((monster_type) mons->type, PRONOUN_NOCAP)
+ << " has not noticed you - yet.";
}
else if (Options.may_stab_brand != CHATTR_NORMAL
&& mons_looks_distracted(mons))
{
- ostr << "Apparently it has been distracted by something.";
+ ostr << "Apparently "
+ << mons_pronoun((monster_type) mons->type, PRONOUN_NOCAP)
+ << " has been distracted by something.";
}
std::string broken = ostr.str();