Use function for combined str/hp loss from poison
Since losestr and losehp calls go together most of the time, this feels like it probably makes more sense than repeating the killer name/format twice in a row all over the place.
This commit is contained in:
@@ -152,10 +152,9 @@ 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),
|
||||
"contact-poisoned spellbook", KILLED_BY_AN);
|
||||
losehp(rnd(Poison_resistance ? 6 : 10), "contact-poisoned spellbook",
|
||||
KILLED_BY_AN);
|
||||
poison_strdmg(Poison_resistance ? rn1(2, 1) : rn1(4, 3),
|
||||
rnd(Poison_resistance ? 6 : 10),
|
||||
"contact-poisoned spellbook", KILLED_BY_AN);
|
||||
bp->in_use = was_in_use;
|
||||
break;
|
||||
case 6:
|
||||
|
||||
Reference in New Issue
Block a user