From 33b24e66a7a26ba76ae804996f16a1b8b779a353 Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Mon, 21 Sep 2009 21:13:09 +0000 Subject: * Actually use the rock worm's corpse tile. * Tweak a few skill titles. * Update the change log (not for these, though). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10769 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/describe.cc | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) (limited to 'crawl-ref/source/describe.cc') diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc index 1586fd4b63..8fc83f6c9d 100644 --- a/crawl-ref/source/describe.cc +++ b/crawl-ref/source/describe.cc @@ -3290,6 +3290,20 @@ static int _piety_level() } +std::string god_title(god_type which_god) +{ + std::string title; + if (you.penance[which_god]) + title = divine_title[which_god][0]; + else + title = divine_title[which_god][_piety_level()]; + + title = replace_all(title, "%s", + species_name(you.species, 1, true, false)); + + return (title); +} + static void _detailed_god_description(god_type which_god) { clrscr(); @@ -3457,16 +3471,7 @@ void describe_god( god_type which_god, bool give_title ) cprintf(EOL "Title - "); textcolor(colour); - std::string title; - - if (you.penance[which_god]) - title = divine_title[which_god][0]; - else - title = divine_title[which_god][_piety_level()]; - - title = replace_all(title, "%s", - species_name(you.species, 1, true, false)); - + std::string title = god_title(which_god); cprintf("%s", title.c_str()); } -- cgit v1.2.3-54-g00ecf