diff options
Diffstat (limited to 'crawl-ref/source/hiscores.cc')
-rw-r--r-- | crawl-ref/source/hiscores.cc | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/crawl-ref/source/hiscores.cc b/crawl-ref/source/hiscores.cc index ffd64530a1..830fa9f0f4 100644 --- a/crawl-ref/source/hiscores.cc +++ b/crawl-ref/source/hiscores.cc @@ -842,6 +842,14 @@ void scorefile_entry::init_death_cause(int dam, int dsrc, mon_num = 0; death_source_name[0] = 0; } + + if (death_type == KILLED_BY_WEAKNESS + || death_type == KILLED_BY_STUPIDITY + || death_type == KILLED_BY_CLUMSINESS) + { + if (auxkilldata == "") + auxkilldata = "unknown source"; + } } void scorefile_entry::reset() @@ -1622,6 +1630,31 @@ scorefile_entry::death_description(death_desc_verbosity verbosity) const break; } // end switch + switch (death_type) + { + case KILLED_BY_STUPIDITY: + case KILLED_BY_WEAKNESS: + case KILLED_BY_CLUMSINESS: + if (terse) + { + desc += " ("; + desc += auxkilldata; + desc += ")"; + } + else + { + desc += "\n"; + desc += " "; + desc += "... caused by "; + desc += auxkilldata; + } + break; + + default: + break; + } + + if (oneline && desc.length() > 2) desc[1] = tolower(desc[1]); |