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:
@@ -152,7 +152,8 @@ cursed_book(struct obj* bp)
|
||||
/* temp disable in_use; death should not destroy the book */
|
||||
was_in_use = bp->in_use;
|
||||
bp->in_use = FALSE;
|
||||
losestr(Poison_resistance ? rn1(2, 1) : rn1(4, 3));
|
||||
losestr(Poison_resistance ? rn1(2, 1) : rn1(4, 3),
|
||||
"contact-poisoned spellbook", KILLED_BY_AN);
|
||||
losehp(rnd(Poison_resistance ? 6 : 10), "contact-poisoned spellbook",
|
||||
KILLED_BY_AN);
|
||||
bp->in_use = was_in_use;
|
||||
|
||||
Reference in New Issue
Block a user