diff options
author | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-09-22 09:21:32 +0000 |
---|---|---|
committer | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-09-22 09:21:32 +0000 |
commit | faa6d08c428ad8280f84707fa8d4586440b98631 (patch) | |
tree | 9efc32b7df06c6ecc579766f5b0a7ab24c4a73d1 /crawl-ref/source/hiscores.cc | |
parent | cce90fadce5dca04e3000cf488e619975bddd8ae (diff) | |
download | crawl-ref-faa6d08c428ad8280f84707fa8d4586440b98631.tar.gz crawl-ref-faa6d08c428ad8280f84707fa8d4586440b98631.zip |
Added additional optional parameter to item_def::name(), ignore_flags,
which will cause the name to be constructed as if those item flags
had been unset.
Give an auxiliary cause of death for a stat going below 1. (Death
by stat loss is already pretty rare, and death by stat loss with
confusion as to what caused the stat loss must be *really* rare, but still,
if you were confused about what caused the stat loss that lead to death,
that'd be pretty frustrating)
ouch() is now called from within modify_stat() and lose_stat() right after
the stat is lowered, rather than when the stat is updated on the screen.
This incidentally fixes the minor annoyance of saying "no" to stat loss
death in wizard mode, only to be asked if you want to die every time
the screen is updated until you fix having a non-positive stat.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2179 c06c8d41-db1a-0410-9941-cceddc491573
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]); |