summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-15 23:12:03 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-15 23:12:03 +0000
commitfef9f681531bf38dc5a969ba9d502418239f89c4 (patch)
tree254823fdbf77bb313f407aed250963cfa3fb275e
parent640681c01424da536a923083e0f39d346e219f44 (diff)
downloadcrawl-ref-fef9f681531bf38dc5a969ba9d502418239f89c4.tar.gz
crawl-ref-fef9f681531bf38dc5a969ba9d502418239f89c4.zip
Move the tutorial descriptions of gods' likes and dislikes into
functions of their own, and reuse them in the god descriptions ('^' screen, when praying at altars, and when searching the database). What's still missing is some sort of "What this god offers you". The current handling makes gods like Lugonu, who have no restrictions and demand very little, appear like no-brainers, when of course the whole thing is much more complicated. I'll also be adding some extended information for the ^ screen (thus for your own god only). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5870 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r--crawl-ref/docs/changes.stone_soup11
-rw-r--r--crawl-ref/source/command.cc106
-rw-r--r--crawl-ref/source/describe.cc79
-rw-r--r--crawl-ref/source/religion.cc240
-rw-r--r--crawl-ref/source/religion.h5
-rw-r--r--crawl-ref/source/skills2.cc2
-rw-r--r--crawl-ref/source/tutorial.cc208
7 files changed, 396 insertions, 255 deletions
diff --git a/crawl-ref/docs/changes.stone_soup b/crawl-ref/docs/changes.stone_soup
index d8715bba07..aa08c3704d 100644
--- a/crawl-ref/docs/changes.stone_soup
+++ b/crawl-ref/docs/changes.stone_soup
@@ -23,6 +23,7 @@ Interface
* Overhauled (f)iring interface: abolish (t)hrowing, output quiver in status.
* Allow selection of equipment slots from '%' overview screen.
* Improved butchering interface.
+* Added coloured HP/Magic bars.
* Many new tutorial information triggers.
* Allow searching item/monster/spell descriptions ('?/' command).
* Allow swapping (' command) to non-weapons that need to be wielded for spells.
@@ -38,6 +39,7 @@ Interface
* (W)ear and (P)ut on menus allow removal of equipped items.
* Arriving via stairs calls autopickup and lists items on square.
* Refuse to eat rotten meat for non-saprovorous characters.
+* Added harmful effects (poison etc.) to chunk descriptions.
* Evaporate can now be cancelled during potion/direction choice.
* Portaled Projectile now allows choice of ammunition.
* greedy_explore now defaults to true.
@@ -87,7 +89,7 @@ Items
* Thrown potions of poison won't poison monsters anymore.
* Limit racial properties applying to only some fitting item types.
* Prompt when attempting to sacrifice important items.
-* Fix books in shops being noted as identified over and over again.
+* Fixed books in shops being noted as identified over and over again.
Monsters
--------
@@ -118,11 +120,12 @@ Monsters
* Implemented Dispel Undead for monsters.
* Fix nagas/centaurs never being generating with bardings.
* Monsters may use wands of disintegration and polymorph other (mutates).
+* Make paralysed monsters stabbable.
* Give a message for kills out of LOS.
* No experience for killing summoned monsters.
* Give half xp for enslaved monsters dying.
-* Monster blink is now restricted to their LOS.
-* Introduced fish zombies (vault defined only).
+* Monster blink is now (mostly) restricted to their LOS.
+* Introduced fish zombies.
* Fixed several spell/invocation attacks not waking monsters.
* Improved monster shields.
* More refined monster speech. (See /docs/monster_speech.txt.)
@@ -162,8 +165,8 @@ Miscellaneous
* Train Stealth by sneaking around sleeping monsters.
* Train Traps & Doors by setting off traps.
* Increase cost for self-banishment, and nerf Banishment spell.
+* Replace Paralyse spell with new spell Petrify.
* Better feedback on Detect Traps.
-* Added coloured HP/Magic bars.
* Identify post-mortem inventory in morgue.txt.
* Dump command also dumps level map.
* init.txt/crawlrc allow loading of external options/macro files.
diff --git a/crawl-ref/source/command.cc b/crawl-ref/source/command.cc
index 2a597731ed..83ebe47426 100644
--- a/crawl-ref/source/command.cc
+++ b/crawl-ref/source/command.cc
@@ -1069,53 +1069,71 @@ static void _recap_feat_keys(std::vector<std::string> &keys)
static bool _do_description(std::string key, std::string footer = "")
{
std::string desc = getLongDescription(key);
+ int width = get_number_of_cols();
+ if (width > 80)
+ width = 80;
- monster_type mon_num = get_monster_by_name(key, true);
- if (mon_num != MONS_PROGRAM_BUG)
+ god_type which_god = string_to_god(key.c_str());
+ if (which_god != GOD_NO_GOD)
{
- if (mons_genus(mon_num) == MONS_DRACONIAN)
+ desc += EOL EOL;
+ desc += print_god_likes(which_god);
+
+ std::string help = print_god_dislikes(which_god);
+ if (!help.empty())
+ {
+ desc += EOL EOL;
+ desc += help;
+ }
+ }
+ else
+ {
+ monster_type mon_num = get_monster_by_name(key, true);
+ if (mon_num != MONS_PROGRAM_BUG)
{
- monsters mon;
+ if (mons_genus(mon_num) == MONS_DRACONIAN)
+ {
+ monsters mon;
- mon.type = mon_num;
+ mon.type = mon_num;
- switch (mon_num)
- {
- case MONS_BLACK_DRACONIAN:
- case MONS_MOTTLED_DRACONIAN:
- case MONS_YELLOW_DRACONIAN:
- case MONS_GREEN_DRACONIAN:
- case MONS_PURPLE_DRACONIAN:
- case MONS_RED_DRACONIAN:
- case MONS_WHITE_DRACONIAN:
- case MONS_PALE_DRACONIAN:
- mon.base_monster = mon_num;
- break;
- default:
- mon.base_monster = MONS_PROGRAM_BUG;
- break;
- }
+ switch (mon_num)
+ {
+ case MONS_BLACK_DRACONIAN:
+ case MONS_MOTTLED_DRACONIAN:
+ case MONS_YELLOW_DRACONIAN:
+ case MONS_GREEN_DRACONIAN:
+ case MONS_PURPLE_DRACONIAN:
+ case MONS_RED_DRACONIAN:
+ case MONS_WHITE_DRACONIAN:
+ case MONS_PALE_DRACONIAN:
+ mon.base_monster = mon_num;
+ break;
+ default:
+ mon.base_monster = MONS_PROGRAM_BUG;
+ break;
+ }
- describe_monsters(mon);
- return (false);
- }
+ describe_monsters(mon);
+ return (false);
+ }
- std::string symbol = "";
- symbol += get_monster_data(mon_num)->showchar;
- if (isupper(symbol[0]))
- symbol = "cap-" + symbol;
+ std::string symbol = "";
+ symbol += get_monster_data(mon_num)->showchar;
+ if (isupper(symbol[0]))
+ symbol = "cap-" + symbol;
- std::string symbol_prefix = "__";
- symbol_prefix += symbol;
- symbol_prefix += "_prefix";
- desc = getLongDescription(symbol_prefix) + desc;
+ std::string symbol_prefix = "__";
+ symbol_prefix += symbol;
+ symbol_prefix += "_prefix";
+ desc = getLongDescription(symbol_prefix) + desc;
- std::string symbol_suffix = "__";
- symbol_suffix += symbol;
- symbol_suffix += "_suffix";
- desc += getLongDescription(symbol_suffix);
+ std::string symbol_suffix = "__";
+ symbol_suffix += symbol;
+ symbol_suffix += "_suffix";
+ desc += getLongDescription(symbol_suffix);
+ }
}
-
key = uppercase_first(key);
key += "$$";
@@ -1124,11 +1142,14 @@ static bool _do_description(std::string key, std::string footer = "")
if (footer != "")
{
- const int numcols = get_number_of_cols();
- int num_lines = linebreak_string2(footer, numcols);
+ int num_lines = linebreak_string2(footer, width);
num_lines++;
- cgotoxy(1, get_number_of_lines() - num_lines);
+ // So the footer doesn't get lonely on large displays. :)
+ int bottom_line = get_number_of_lines();
+ if (bottom_line > 30)
+ bottom_line = 30;
+ cgotoxy(1, bottom_line - num_lines);
cprintf(footer.c_str());
}
@@ -1215,6 +1236,7 @@ static bool _find_description(bool &again, std::string& error_inout)
mprf(MSGCH_PROMPT,
"Describe a %s; partial names and regexps are fine.%s",
type.c_str(), extra.c_str());
+
mpr("Describe what? ", MSGCH_PROMPT);
char buf[80];
if (cancelable_get_line(buf, sizeof(buf)) || buf[0] == '\0')
@@ -1231,7 +1253,7 @@ static bool _find_description(bool &again, std::string& error_inout)
if (regex == "")
{
error_inout = "Description must contain at least "
- "one non-space.";
+ "one non-space.";
return (false);
}
}
@@ -1396,7 +1418,7 @@ static bool _find_description(bool &again, std::string& error_inout)
if (_do_description(key))
{
- if ( getch() == 0 )
+ if (getch() == 0)
getch();
}
}
diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc
index 379ca1f684..a9ac2c0b7a 100644
--- a/crawl-ref/source/describe.cc
+++ b/crawl-ref/source/describe.cc
@@ -1819,9 +1819,8 @@ void describe_feature_wide(int x, int y)
desc += "$$";
// Get rid of trailing .$$ before lookup
- desc +=
- getLongDescription(grd[x][y] == DNGN_ENTER_SHOP? "A shop"
- : desc.substr(0, desc.length() - 3));
+ desc += getLongDescription(grd[x][y] == DNGN_ENTER_SHOP ? "A shop"
+ : desc.substr(0, desc.length() - 3));
// For things which require logic
desc += _get_feature_description_wide(grd[x][y]);
@@ -2659,6 +2658,62 @@ static int _piety_level()
}
+static void _detailed_god_description(god_type which_god)
+{
+ clrscr();
+ int width = get_number_of_cols();
+ if (width > 80)
+ width = 80;
+
+ std::string godname = god_name(which_god, true);
+ int len = get_number_of_cols() - godname.length();
+ textcolor(god_colour(which_god));
+ cprintf("%s%s" EOL, std::string(len / 2, ' ').c_str(), godname.c_str());
+ textcolor(LIGHTGREY);
+ cprintf(EOL);
+
+ if (which_god == GOD_XOM)
+ {
+ cprintf("To worship Xom is to live riskily. In a good mood Xom may "
+ "shower you " EOL
+ "with gifts, while at other times this capricious god could "
+ "decide to " EOL
+ "\"spice things up a little\" and send you to your doom. If "
+ "you prove " EOL
+ "yourself the stronger, so much the better; if not, well, "
+ "there'll be " EOL
+ "other playthings..." EOL);
+ }
+ else
+ {
+ std::string broken = print_god_likes(which_god, true);
+ linebreak_string2(broken, width);
+ formatted_string::parse_block(broken, false).display();
+ cprintf(EOL);
+ cprintf(EOL);
+ broken = print_god_dislikes(which_god, true);
+ linebreak_string2(broken, width);
+ formatted_string::parse_block(broken, false).display();
+ }
+
+ int bottom_line = get_number_of_lines();
+ if (bottom_line > 30)
+ bottom_line = 30;
+
+ cgotoxy(1, bottom_line-1);
+ formatted_string::parse_string(
+ "Press '<w>!</w>' to toggle between the overview and the more detailed "
+ "description.").display();
+
+#ifdef USE_TILE
+ mouse_control mc(MOUSE_MODE_MORE);
+#endif
+
+ const int keyin = getch();
+ if (keyin == '!')
+ describe_god(which_god, true);
+}
+
void describe_god( god_type which_god, bool give_title )
{
int colour; // Colour used for some messages.
@@ -2783,9 +2838,10 @@ void describe_god( god_type which_god, bool give_title )
{
have_any = true;
if (you.piety >= 30)
+ {
cprintf("Praying to %s will provide sustenance if starving."
- EOL, god_name(which_god).c_str());
-
+ EOL, god_name(which_god).c_str());
+ }
const char *how = (you.piety >= 150) ? "carefully" : // res mut. 3
(you.piety >= 100) ? "often" :
(you.piety >= 50) ? "sometimes" :
@@ -2849,9 +2905,20 @@ void describe_god( god_type which_god, bool give_title )
numcols).c_str());
}
+ int bottom_line = get_number_of_lines();
+ if (bottom_line > 30)
+ bottom_line = 30;
+ cgotoxy(1, bottom_line-1);
+ textcolor(LIGHTGRAY);
+ formatted_string::parse_string(
+ "Press '<w>!</w>' to toggle between the overview and the more detailed "
+ "description.").display();
+
#ifdef USE_TILE
mouse_control mc(MOUSE_MODE_MORE);
#endif
- get_ch();
+ const int keyin = getch();
+ if (keyin == '!')
+ _detailed_god_description(which_god);
}
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc
index b017addf04..6aaa64e942 100644
--- a/crawl-ref/source/religion.cc
+++ b/crawl-ref/source/religion.cc
@@ -464,6 +464,233 @@ bool god_gives_permanent_followers(god_type god)
|| god == GOD_BEOGH);
}
+
+std::string print_god_likes(god_type which_god, bool verbose)
+{
+ // Return early for the special cases.
+ if (which_god == GOD_NO_GOD || which_god == GOD_XOM)
+ return "";
+
+ std::string text = god_name(which_god);
+ std::vector<std::string> likes;
+
+ // Unique/unusual piety gain methods first.
+ switch (which_god)
+ {
+ case GOD_SIF_MUNA:
+ likes.push_back("train your various spell casting skills");
+ break;
+
+ case GOD_TROG:
+ snprintf(info, INFO_SIZE, "destroy spellbooks (especially ones you've"
+ "never read)%s",
+ verbose ? "via the <w>a</w> command" : "");
+
+ likes.push_back(info);
+ break;
+
+ case GOD_NEMELEX_XOBEH:
+ likes.push_back("draw unmarked cards and use up decks");
+ break;
+
+ case GOD_ELYVILON:
+ snprintf(info, INFO_SIZE, "destroy weapons (especially evil ones)%s",
+ verbose ? "via the <w>a</w> command" : "");
+
+ likes.push_back(info);
+ break;
+
+ default:
+ break;
+ }
+
+ switch (which_god)
+ {
+ case GOD_SHINING_ONE: case GOD_KIKUBAAQUDGHA: case GOD_OKAWARU:
+ case GOD_MAKHLEB: case GOD_SIF_MUNA: case GOD_TROG:
+ snprintf(info, INFO_SIZE, "sacrifice items%s",
+ verbose ? " (by dropping them on an altar and praying)" : "");
+
+ likes.push_back(info);
+ break;
+
+ case GOD_NEMELEX_XOBEH:
+ snprintf(info, INFO_SIZE, "sacrifice items%s",
+ verbose ? " (by standing over them and praying)" : "");
+
+ likes.push_back(info);
+ break;
+
+ case GOD_ZIN:
+ snprintf(info, INFO_SIZE, "sacrifice gold%s",
+ verbose ? " (by praying at an altar)" : "");
+
+ likes.push_back(info);
+ break;
+
+ default:
+ break;
+ }
+
+ if (god_likes_butchery(which_god))
+ likes.push_back("butcher corpses while praying");
+
+ switch (which_god)
+ {
+ case GOD_KIKUBAAQUDGHA: case GOD_YREDELEMNUL: case GOD_OKAWARU:
+ case GOD_VEHUMET: case GOD_MAKHLEB: case GOD_TROG:
+ case GOD_BEOGH: case GOD_LUGONU:
+ likes.push_back("kill living beings");
+ break;
+
+ default:
+ break;
+ }
+
+ switch (which_god)
+ {
+ case GOD_SHINING_ONE: case GOD_OKAWARU: case GOD_VEHUMET:
+ case GOD_MAKHLEB: case GOD_LUGONU:
+ likes.push_back("kill the undead");
+ break;
+
+ default:
+ break;
+ }
+
+ switch (which_god)
+ {
+ case GOD_SHINING_ONE: case GOD_OKAWARU: case GOD_MAKHLEB:
+ likes.push_back("kill demons");
+ break;
+
+ default:
+ break;
+ }
+
+ // Unusual kills.
+ switch (which_god)
+ {
+ case GOD_ZIN:
+ likes.push_back("kill monsters which cause mutation or rotting");
+ break;
+
+ case GOD_SHINING_ONE:
+ likes.push_back("kill living evil beings");
+ break;
+
+ case GOD_BEOGH:
+ likes.push_back("kill the priests of other religions");
+ break;
+
+ case GOD_TROG:
+ likes.push_back("kill wizards and other users of magic");
+ break;
+
+ default:
+ break;
+ }
+
+ if (likes.size() == 0)
+ {
+ text += " %s doesn't like anything? This a bug; please report it.";
+ }
+ else
+ {
+ text += " likes it when you ";
+ text += comma_separated_line(likes.begin(), likes.end(),
+ " and ", ", ");
+ text += ".";
+ }
+
+ return (text);
+}
+
+// verbose currently unused
+std::string print_god_dislikes(god_type which_god, bool /*verbose*/)
+{
+ // Return early for the special cases.
+ if (which_god == GOD_NO_GOD || which_god == GOD_XOM)
+ return "";
+
+ std::vector<std::string> dislikes;
+
+ if (god_hates_butchery(which_god))
+ dislikes.push_back("butcher corpses while praying");
+
+ if (is_good_god(which_god))
+ {
+ dislikes.push_back("drink blood");
+ dislikes.push_back("perform cannibalism");
+ dislikes.push_back("use necromancy");
+ dislikes.push_back("use unholy magic or items");
+ dislikes.push_back("attack holy beings");
+ dislikes.push_back("attack neutral beings");
+ }
+
+ switch (which_god)
+ {
+ case GOD_ZIN: case GOD_SHINING_ONE: case GOD_ELYVILON:
+ case GOD_OKAWARU:
+ dislikes.push_back("attack allies");
+ break;
+
+ case GOD_BEOGH:
+ dislikes.push_back("attack allied orcs");
+ break;
+
+ default:
+ break;
+ }
+
+ switch (which_god)
+ {
+ case GOD_ELYVILON: case GOD_ZIN: case GOD_OKAWARU:
+ dislikes.push_back("allow an ally to die");
+ break;
+
+ default:
+ break;
+ }
+
+ switch (which_god)
+ {
+ case GOD_ZIN:
+ dislikes.push_back("cause yourself to mutate in a way that could "
+ "have been avoided");
+ dislikes.push_back("eat the flesh of sentient beings");
+ break;
+
+ case GOD_SHINING_ONE:
+ dislikes.push_back("poison a monster");
+ dislikes.push_back("attack in an unchivalric manner");
+ break;
+
+ case GOD_ELYVILON:
+ dislikes.push_back("kill a living thing while praying");
+ break;
+
+ case GOD_TROG:
+ dislikes.push_back("memorize spells");
+ dislikes.push_back("cast spells");
+ break;
+
+ default:
+ break;
+ }
+
+ if (dislikes.empty())
+ return "";
+
+ std::string text = god_name(which_god);
+ text += " dislikes it when you ";
+ text += comma_separated_line(dislikes.begin(), dislikes.end(),
+ " or ", ", ");
+ text += ".";
+
+ return (text);
+}
+
void dec_penance(god_type god, int val)
{
if (you.penance[god] > 0)
@@ -1889,6 +2116,19 @@ std::string god_name( god_type which_god, bool long_name )
return "";
}
+god_type string_to_god(const char *name)
+{
+ god_type god;
+ for (int i = 0; i < NUM_GODS; i++)
+ {
+ god = (god_type) i;
+ if (name == god_name(god, false))
+ return (god);
+ }
+
+ return (GOD_NO_GOD);
+}
+
void god_speaks( god_type god, const char *mesg )
{
mpr( mesg, MSGCH_GOD, god );
diff --git a/crawl-ref/source/religion.h b/crawl-ref/source/religion.h
index 63aec2b5c9..60b3fbd094 100644
--- a/crawl-ref/source/religion.h
+++ b/crawl-ref/source/religion.h
@@ -60,6 +60,11 @@ bool god_gives_permanent_followers(god_type god);
void simple_god_message(const char *event, god_type which_deity = you.religion);
int piety_breakpoint(int i);
std::string god_name(god_type which_god, bool long_name = false);
+god_type string_to_god(const char *name);
+
+std::string print_god_likes(god_type which_god, bool verbose = false);
+std::string print_god_dislikes(god_type which_god, bool verbose = false);
+
void dec_penance(int val);
void dec_penance(god_type god, int val);
diff --git a/crawl-ref/source/skills2.cc b/crawl-ref/source/skills2.cc
index ff56b9babf..ee99c323bb 100644
--- a/crawl-ref/source/skills2.cc
+++ b/crawl-ref/source/skills2.cc
@@ -1835,7 +1835,7 @@ static void _display_skill_table(bool show_aptitudes)
if (_player_knows_aptitudes())
{
cgotoxy(1, bottom_line);
- formatted_string::parse_string("Press '!' to toggle between "
+ formatted_string::parse_string("Press '<w>!</w>' to toggle between "
"<cyan>progress</cyan> and "
"<red>aptitude</red> "
"display.").display();
diff --git a/crawl-ref/source/tutorial.cc b/crawl-ref/source/tutorial.cc
index 2f51959ef8..76f32ea905 100644
--- a/crawl-ref/source/tutorial.cc
+++ b/crawl-ref/source/tutorial.cc
@@ -1466,213 +1466,17 @@ static void _new_god_conduct()
_get_tutorial_cols());
text.str("");
- std::vector<std::string> likes;
-
- // Unique/unusual piety gain methods first.
- switch(you.religion)
- {
- case GOD_SIF_MUNA:
- likes.push_back("train your various spell casting skills");
- break;
-
- case GOD_TROG:
- likes.push_back("destroy spell books (especially ones you've"
- "never read) via the <w>a</w> command");
- break;
-
- case GOD_NEMELEX_XOBEH:
- likes.push_back("draw unmarked cards and use up decks");
- break;
-
- case GOD_ELYVILON:
- likes.push_back("destroy weapons (especially evil ones) via "
- "the <w>a</w> command");
- break;
-
- default:
- break;
- }
-
- switch(you.religion)
- {
- case GOD_SHINING_ONE: case GOD_KIKUBAAQUDGHA: case GOD_OKAWARU:
- case GOD_MAKHLEB: case GOD_SIF_MUNA: case GOD_TROG:
- likes.push_back("sacrifice items (by dropping them on an altar "
- "and praying)");
- break;
-
- case GOD_NEMELEX_XOBEH:
- likes.push_back("sacrifice items (by standing over them and "
- "praying)");
- break;
-
- case GOD_ZIN:
- likes.push_back("sacrifice gold (by praying at an altar)");
- break;
-
- default:
- break;
- }
-
- if (god_likes_butchery(you.religion))
- likes.push_back("butcher corpses while praying");
-
- switch(you.religion)
- {
- case GOD_KIKUBAAQUDGHA: case GOD_YREDELEMNUL: case GOD_OKAWARU:
- case GOD_VEHUMET: case GOD_MAKHLEB: case GOD_TROG:
- case GOD_BEOGH: case GOD_LUGONU:
- likes.push_back("kill living beings");
- break;
-
- default:
- break;
- }
-
- switch(you.religion)
- {
- case GOD_SHINING_ONE: case GOD_OKAWARU: case GOD_VEHUMET:
- case GOD_MAKHLEB: case GOD_LUGONU:
- likes.push_back("kill the undead");
- break;
-
- default:
- break;
- }
-
- switch(you.religion)
- {
- case GOD_SHINING_ONE: case GOD_OKAWARU: case GOD_MAKHLEB:
- likes.push_back("kill demons");
- break;
-
- default:
- break;
- }
-
- // Unusual kills.
- switch(you.religion)
- {
- case GOD_ZIN:
- likes.push_back("kill monsters which cause mutation or rotting");
- break;
-
- case GOD_SHINING_ONE:
- likes.push_back("kill living evil beings");
- break;
-
- case GOD_BEOGH:
- likes.push_back("kill the priests of other religions");
- break;
-
- case GOD_TROG:
- likes.push_back("kill wizards and other users of magic");
- break;
-
- default:
- break;
- }
-
- if (likes.size() == 0)
- {
- mprf(MSGCH_ERROR,
- " %s doesn't like anything? This a bug; please report it.",
- new_god_name.c_str());
- }
- else
- {
- text << new_god_name << " likes it when you ";
- text << comma_separated_line(likes.begin(), likes.end(),
- " and ", ", ");
- text << ".";
- formatted_message_history(text.str(), MSGCH_TUTORIAL, 0,
- _get_tutorial_cols());
- text.str("");
- }
-
- std::vector<std::string> dislikes;
-
- if (god_hates_butchery(you.religion))
- dislikes.push_back("butcher corpses while praying");
-
- if (is_good_god(you.religion))
- {
- dislikes.push_back("drink blood");
- dislikes.push_back("perform cannibalism");
- dislikes.push_back("use necromancy");
- dislikes.push_back("use unholy magic or items");
- dislikes.push_back("attack holy beings");
- dislikes.push_back("attack neutral beings");
- }
-
- switch(you.religion)
- {
- case GOD_ZIN: case GOD_SHINING_ONE: case GOD_ELYVILON:
- case GOD_OKAWARU:
- dislikes.push_back("attack allies");
- break;
-
- case GOD_BEOGH:
- dislikes.push_back("attack allied orcs");
- break;
-
- default:
- break;
- }
-
- switch(you.religion)
- {
- case GOD_ELYVILON: case GOD_ZIN: case GOD_OKAWARU:
- dislikes.push_back("allow an ally to die");
- break;
-
- default:
- break;
- }
-
- switch(you.religion)
- {
- case GOD_ZIN:
- dislikes.push_back("cause yourself to mutate in a way that could "
- "have been avoided");
- dislikes.push_back("eat the flesh of sentient beings");
- break;
-
- case GOD_SHINING_ONE:
- dislikes.push_back("poison a monster");
- dislikes.push_back("attack in an unchivalric manner");
- break;
-
- case GOD_ELYVILON:
- dislikes.push_back("kill a living thing while praying");
- break;
-
- case GOD_TROG:
- dislikes.push_back("memorize spells");
- dislikes.push_back("cast spells");
- break;
-
- default:
- break;
- }
-
- if (dislikes.size() > 0)
- {
- text << "\n";
- text << new_god_name << " dislikes it when you ";
- text << comma_separated_line(dislikes.begin(), dislikes.end(),
- " or ", ", ");
- text << ".";
- formatted_message_history(text.str(), MSGCH_TUTORIAL, 0,
- _get_tutorial_cols());
- }
+ formatted_message_history(print_god_likes(you.religion, true).c_str(),
+ MSGCH_TUTORIAL, 0, _get_tutorial_cols());
+ formatted_message_history(print_god_dislikes(you.religion, true).c_str(),
+ MSGCH_TUTORIAL, 0, _get_tutorial_cols());
text.str("");
text << "\nYou can check your god's likes and dislikes, as well as your "
"current standing and divine abilites, at any time by typing "
"<w>^</w> "
#ifdef USE_TILE
- "(alternatively press <w>Control</w> while "
+ "(alternatively press <w>Shift</w> while "
"<w>right-clicking</w> on your avatar)"
#endif
".";
@@ -3915,7 +3719,7 @@ void tutorial_describe_feature(dungeon_feature_type feat)
<< god_name(you.religion)
<< " press <w>^</w>"
#ifdef USE_TILE
- ", or press <w>Control</w> while clicking with "
+ ", or press <w>Shift</w> while clicking with "
"your <w>right mouse button</w> on your avatar"
#endif
".";