summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/godabil.cc
diff options
context:
space:
mode:
authorCharles Otto <ottochar@gmail.com>2010-01-09 19:32:26 -0500
committerCharles Otto <ottochar@gmail.com>2010-01-09 19:56:27 -0500
commitf01cabdb4194455edde71d58122114a7f22c426f (patch)
tree47f8920fb52a53008a82af0a86a5dfdcd3fa894b /crawl-ref/source/godabil.cc
parentca5fe3a360d00305050f189d17a1ca208923a258 (diff)
downloadcrawl-ref-f01cabdb4194455edde71d58122114a7f22c426f.tar.gz
crawl-ref-f01cabdb4194455edde71d58122114a7f22c426f.zip
Restore player kill attribution for Fedhas' sunlight
Give the player exp. if aquatic monsters die due to ENCH_AQUATIC_LAND caused by the player evaporating the water they were in with sunlight.
Diffstat (limited to 'crawl-ref/source/godabil.cc')
-rw-r--r--crawl-ref/source/godabil.cc15
1 files changed, 15 insertions, 0 deletions
diff --git a/crawl-ref/source/godabil.cc b/crawl-ref/source/godabil.cc
index 68acb0790e..a1259291ac 100644
--- a/crawl-ref/source/godabil.cc
+++ b/crawl-ref/source/godabil.cc
@@ -547,6 +547,21 @@ bool sunlight()
if (you.see_cell(target))
evap_count++;
+ // This is a little awkward but if we evaporated all the way to
+ // the dungeon floor that may have given a monster
+ // ENCH_AQUATIC_LAND, and if that happened the player should get
+ // credit if the monster dies. The enchantment is inflicted via
+ // the dungeon_terrain_changed call chain and that doesn't keep
+ // track of what caused the terrain change. -cao
+ monsters * monster = monster_at(target);
+ if (monster && ftype == DNGN_FLOOR
+ && monster->has_ench(ENCH_AQUATIC_LAND))
+ {
+ mon_enchant temp = monster->get_ench(ENCH_AQUATIC_LAND);
+ temp.who = KC_YOU;
+ monster->add_ench(temp);
+ }
+
processed_count++;
}