summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2009-11-23 13:26:24 +0100
committerAdam Borowski <kilobyte@angband.pl>2009-11-23 15:04:32 +0100
commit2d3e3d3d42a7d5efcceaad43b06abe2e026d3346 (patch)
tree5c87075caf72991698b880ae5958bb8e37975feb
parentd4d28a2beed3aca3510b39cc8cc55df4852d96ef (diff)
downloadcrawl-ref-2d3e3d3d42a7d5efcceaad43b06abe2e026d3346.tar.gz
crawl-ref-2d3e3d3d42a7d5efcceaad43b06abe2e026d3346.zip
If you die to disintegration, say "blown up" not "killed".
-rw-r--r--crawl-ref/source/beam.cc2
-rw-r--r--crawl-ref/source/hiscores.cc22
-rw-r--r--crawl-ref/source/ouch.cc7
-rw-r--r--crawl-ref/source/ouch.h1
4 files changed, 30 insertions, 2 deletions
diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc
index e18360be8a..4309d8f4b9 100644
--- a/crawl-ref/source/beam.cc
+++ b/crawl-ref/source/beam.cc
@@ -3432,6 +3432,8 @@ void bolt::internal_ouch(int dam)
ouch(dam, NON_MONSTER, KILLED_BY_TARGETTING);
}
}
+ else if (flavour == BEAM_DISINTEGRATION || flavour == BEAM_NUKE)
+ ouch(dam, beam_source, KILLED_BY_DISINT, aux_source.c_str());
else if (MON_KILL(thrower))
ouch(dam, beam_source, KILLED_BY_BEAM, aux_source.c_str());
else // KILL_MISC || (YOU_KILL && aux_source)
diff --git a/crawl-ref/source/hiscores.cc b/crawl-ref/source/hiscores.cc
index 9c35498092..a99a9b4a95 100644
--- a/crawl-ref/source/hiscores.cc
+++ b/crawl-ref/source/hiscores.cc
@@ -426,7 +426,7 @@ static const char *kill_method_names[] =
"tso_smiting", "petrification", "something",
"falling_down_stairs", "acid", "curare",
"beogh_smiting", "divine_wrath", "bounce", "reflect", "self_aimed",
- "falling_through_gate"
+ "falling_through_gate", "disintegration",
};
const char *kill_method_name(kill_method_type kmt)
@@ -786,6 +786,7 @@ void scorefile_entry::init_death_cause(int dam, int dsrc,
// for death by monster
if ((death_type == KILLED_BY_MONSTER
|| death_type == KILLED_BY_BEAM
+ || death_type == KILLED_BY_DISINT
|| death_type == KILLED_BY_SPORE
|| death_type == KILLED_BY_REFLECTION)
&& !invalid_monster_index(death_source)
@@ -1190,7 +1191,8 @@ const char *scorefile_entry::damage_verb() const
std::string scorefile_entry::death_source_desc() const
{
- if (death_type != KILLED_BY_MONSTER && death_type != KILLED_BY_BEAM)
+ if (death_type != KILLED_BY_MONSTER && death_type != KILLED_BY_BEAM
+ && death_type != KILLED_BY_DISINT)
return ("");
// XXX no longer handles mons_num correctly! FIXME
@@ -1820,6 +1822,22 @@ std::string scorefile_entry::death_description(death_desc_verbosity verbosity)
needs_damage = true;
break;
+ case KILLED_BY_DISINT:
+ if (terse)
+ desc += "disintegration";
+ else
+ {
+ desc += "Blown up";
+ if (death_source == NON_MONSTER)
+ desc += " themselves";
+ else
+ desc += " by " + death_source_desc();
+ needs_beam_cause_line = true;
+ }
+
+ needs_damage = true;
+ break;
+
default:
desc += terse? "program bug" : "Nibbled to death by software bugs";
break;
diff --git a/crawl-ref/source/ouch.cc b/crawl-ref/source/ouch.cc
index b9416a97a7..da61e3fc34 100644
--- a/crawl-ref/source/ouch.cc
+++ b/crawl-ref/source/ouch.cc
@@ -786,8 +786,15 @@ static void _xom_checks_damage(kill_method_type death_type,
xom_is_stimulated(255);
return;
}
+ else if (death_type == KILLED_BY_DISINT)
+ {
+ // flying chunks...
+ xom_is_stimulated(128);
+ return;
+ }
else if (death_type != KILLED_BY_MONSTER
&& death_type != KILLED_BY_BEAM
+ && death_type != KILLED_BY_DISINT
|| invalid_monster_index(death_source))
{
return;
diff --git a/crawl-ref/source/ouch.h b/crawl-ref/source/ouch.h
index 721acefc3f..87c545f239 100644
--- a/crawl-ref/source/ouch.h
+++ b/crawl-ref/source/ouch.h
@@ -50,6 +50,7 @@ enum kill_method_type
KILLED_BY_REFLECTION,
KILLED_BY_SELF_AIMED,
KILLED_BY_FALLING_THROUGH_GATE,
+ KILLED_BY_DISINT,
NUM_KILLBY
};