From f01cabdb4194455edde71d58122114a7f22c426f Mon Sep 17 00:00:00 2001 From: Charles Otto Date: Sat, 9 Jan 2010 19:32:26 -0500 Subject: 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. --- crawl-ref/source/godabil.cc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'crawl-ref/source/godabil.cc') 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++; } -- cgit v1.2.3-54-g00ecf