Don't make callers responsible for losestr death
Remove callers' responsibility to deal with possible hero death when calling losestr. This is less fragile and error-prone than leaving it in the caller's hands, but it means that death from the monster spell 'weaken target' no longer goes through done_in_by, and the death reason is no longer "killed by <monster name>".
This commit is contained in:
@@ -465,11 +465,7 @@ cast_wizard_spell(struct monst *mtmp, int dmg, int spellnum)
|
||||
dmg = mtmp->m_lev - 6;
|
||||
if (Half_spell_damage)
|
||||
dmg = (dmg + 1) / 2;
|
||||
losestr(rnd(dmg));
|
||||
if (u.uhp < 1)
|
||||
done_in_by(mtmp, DIED);
|
||||
else if (Upolyd && u.mh < 1)
|
||||
rehumanize();
|
||||
losestr(rnd(dmg), (const char *) 0, 0);
|
||||
}
|
||||
dmg = 0;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user