summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2008-09-06 13:39:56 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2008-09-06 13:39:56 +0000
commit40a2450967f83c467d46c3b49cc0d0278a139587 (patch)
treeb1c853f203129ccde4e4d6cc10a6657b2144eaf9 /crawl-ref/source
parent756243bbee28fdd9ed0327dee41f6a0f1563f11a (diff)
downloadcrawl-ref-40a2450967f83c467d46c3b49cc0d0278a139587.tar.gz
crawl-ref-40a2450967f83c467d46c3b49cc0d0278a139587.zip
[2092341] Named monsters will also be recorded with their base monster type in the logfile.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6891 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source')
-rw-r--r--crawl-ref/source/directn.cc7
-rw-r--r--crawl-ref/source/hiscores.cc8
2 files changed, 9 insertions, 6 deletions
diff --git a/crawl-ref/source/directn.cc b/crawl-ref/source/directn.cc
index 929f11ae81..50809bdd9b 100644
--- a/crawl-ref/source/directn.cc
+++ b/crawl-ref/source/directn.cc
@@ -1687,7 +1687,7 @@ static bool _find_mlist( const coord_def& where, int idx, bool need_path,
continue;
real_idx++;
- }
+ }
monsters *mon = &menv[targ_mon];
@@ -2783,11 +2783,8 @@ std::string get_monster_desc(const monsters *mon, bool full_desc,
// Note that the only difference between DESC_BASENAME and DESC_PLAIN
// is that basename will ignore mname, so the monster _must_ be named
// for this to make any sense.
- if (!(mon->mname).empty() && desc != mon->name(DESC_BASENAME)
- && mon->type != MONS_PLAYER_GHOST)
- {
+ if (mon->has_base_name())
desc += " the " + mon->name(DESC_BASENAME);
- }
if (print_attitude)
{
diff --git a/crawl-ref/source/hiscores.cc b/crawl-ref/source/hiscores.cc
index 110fa31d07..612350ed18 100644
--- a/crawl-ref/source/hiscores.cc
+++ b/crawl-ref/source/hiscores.cc
@@ -824,7 +824,13 @@ void scorefile_entry::init_death_cause(int dam, int dsrc,
auxkilldata = mitm[monster->inv[MSLOT_WEAPON]].name(DESC_NOCAP_A);
}
- death_source_name = monster->name(DESC_NOCAP_A, true);
+ const bool death = you.hp <= 0;
+
+ death_source_name = monster->name(DESC_NOCAP_A, death);
+ if (monster->has_base_name())
+ death_source_name +=
+ ", " + monster->base_name(DESC_NOCAP_A, death);
+
if (monster->has_ench(ENCH_SHAPESHIFTER))
{
death_source_name += " (shapeshifter)";