Properly credit guardian golem explosions
authorNicholas Feinberg <pleasingfung@gmail.com>
Sun, 18 Apr 2021 18:47:25 +0000 (11:47 -0700)
committerNicholas Feinberg <pleasingfung@gmail.com>
Sun, 18 Apr 2021 18:48:46 +0000 (11:48 -0700)
They were being attributed to the dead monster, not to the hexer,
which resulted in the player not getting XP for kills from the explosion
damage itself (though they did get credit for any cloud kills, oddly).

crawl-ref/source/mon-explode.cc

index dbae6da..bab1634 100644 (file)
@@ -132,6 +132,8 @@ static void _setup_inner_flame_explosion(bolt & beam, const monster& origin,
     beam.origin_spell = SPELL_INNER_FLAME;
     beam.thrower     = (agent && agent->is_player()) ? KILL_YOU_MISSILE
                                                      : KILL_MON_MISSILE;
+    if (agent)
+        beam.source_id = agent->mid;
 }
 
 static void _setup_bloated_husk_explosion(bolt & beam, const monster& origin)