summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/effects.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/effects.cc')
-rw-r--r--crawl-ref/source/effects.cc14
1 files changed, 9 insertions, 5 deletions
diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc
index b51f8410d7..6ae8982826 100644
--- a/crawl-ref/source/effects.cc
+++ b/crawl-ref/source/effects.cc
@@ -183,8 +183,13 @@ int torment_player(int pow, int caster)
const char *aux = "torment";
- if (caster < 0)
+ kill_method_type type = KILLED_BY_MONSTER;
+ if (invalid_monster_index(caster))
{
+ type = KILLED_BY_SOMETHING;
+ if (crawl_state.is_god_acting())
+ type = KILLED_BY_DIVINE_WRATH;
+
switch (caster)
{
case TORMENT_CARDS:
@@ -203,14 +208,13 @@ int torment_player(int pow, int caster)
break;
case TORMENT_XOM:
- aux = "Xom's torment";
+ type = KILLED_BY_XOM;
+ aux = "Xom's torment";
break;
}
}
- ouch(hploss, caster, (caster != TORMENT_GENERIC) ? KILLED_BY_MONSTER
- : KILLED_BY_SOMETHING,
- aux);
+ ouch(hploss, caster, type, aux);
return 1;
}