diff options
author | Steve Melenchuk <smelenchuk@gmail.com> | 2014-02-26 21:48:09 -0700 |
---|---|---|
committer | Steve Melenchuk <smelenchuk@gmail.com> | 2014-02-26 21:48:09 -0700 |
commit | 2280caa48a5b2f66cd94ee90e71bad0e4d15836e (patch) | |
tree | 13ae6f1ccab8975aedfacc0f2de54e2ec3b12ccd /crawl-ref/source/hiscores.cc | |
parent | 5516d479cdc6e041aebf3df4311fde0ab3d6fb48 (diff) | |
download | crawl-ref-2280caa48a5b2f66cd94ee90e71bad0e4d15836e.tar.gz crawl-ref-2280caa48a5b2f66cd94ee90e71bad0e4d15836e.zip |
Blast "blasted by (static electricity)" with static electricity.
You now get terse "blasted by themself (static electricity)" and verbose
"Killed by their own static electricity".
This also adjusts the self-LRD death source to "you" to employ this new
handling.
Diffstat (limited to 'crawl-ref/source/hiscores.cc')
-rw-r--r-- | crawl-ref/source/hiscores.cc | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/crawl-ref/source/hiscores.cc b/crawl-ref/source/hiscores.cc index d78fe1dfc5..0072ae8ccd 100644 --- a/crawl-ref/source/hiscores.cc +++ b/crawl-ref/source/hiscores.cc @@ -2068,7 +2068,8 @@ string scorefile_entry::death_description(death_desc_verbosity verbosity) const snprintf(scratch, sizeof(scratch), "%s by ", _range_type_verb(auxkilldata.c_str())); desc += scratch; - desc += death_source_desc(); + desc += (death_source_name == "you") ? "themself" + : death_source_desc(); if (semiverbose) { @@ -2091,9 +2092,18 @@ string scorefile_entry::death_description(death_desc_verbosity verbosity) const { // "by" is used for priest attacks where the effect is indirect // in verbose format we have another line for the monster - needs_called_by_monster_line = true; - snprintf(scratch, sizeof(scratch), "Killed %s", - auxkilldata.c_str()); + if (death_source_name == "you") + { + needs_damage = true; + snprintf(scratch, sizeof(scratch), "Killed by their own %s", + auxkilldata.substr(3).c_str()); + } + else + { + needs_called_by_monster_line = true; + snprintf(scratch, sizeof(scratch), "Killed %s", + auxkilldata.c_str()); + } desc += scratch; } else @@ -2105,7 +2115,10 @@ string scorefile_entry::death_description(death_desc_verbosity verbosity) const else if (!terse) desc += "Killed from afar by "; - desc += death_source_desc(); + if (death_source_name == "you") + desc += "themself"; + else + desc += death_source_desc(); if (!auxkilldata.empty()) needs_beam_cause_line = true; |