From 061e97f1722560e2180323b3e38c76add540b4b6 Mon Sep 17 00:00:00 2001 From: Jude Brown Date: Sun, 27 Dec 2009 12:57:27 +1000 Subject: Fix "shot with an orcish bolt by a yellow wasp" during Mislead. Hopefully that's every occurence. --- crawl-ref/source/hiscores.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'crawl-ref') diff --git a/crawl-ref/source/hiscores.cc b/crawl-ref/source/hiscores.cc index a64b191e73..bf684601c8 100644 --- a/crawl-ref/source/hiscores.cc +++ b/crawl-ref/source/hiscores.cc @@ -777,6 +777,13 @@ void scorefile_entry::init_death_cause(int dam, int dsrc, death_type = dtype; damage = dam; + // Save this here. We don't want to completely remove the status, as that + // would look odd in the "screenshot", but having DUR_MISLED as a non-zero + // value at his point in time will generate such odities as "killed by a + // golden eye, wielding an orcish crossbo [19 damage]", etc. {due} + int misled = you.duration[DUR_MISLED]; + you.duration[DUR_MISLED] = 0; + // Set the default aux data value... // If aux is passed in (ie for a trap), we'll default to that. if (aux == NULL) @@ -887,6 +894,9 @@ void scorefile_entry::init_death_cause(int dam, int dsrc, if (auxkilldata.empty()) auxkilldata = "unknown source"; } + + // And restore it here. + you.duration[DUR_MISLED] = misled; } void scorefile_entry::reset() -- cgit v1.2.3-54-g00ecf