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:
Michael Meyer
2022-10-08 16:29:56 -07:00
committed by PatR
parent 70fe2ce5cd
commit 02367077bd
5 changed files with 18 additions and 12 deletions
+2 -2
View File
@@ -292,8 +292,8 @@ drinkfountain(void)
losehp(rnd(4), "unrefrigerated sip of juice", KILLED_BY_AN);
break;
}
losestr(rn1(4, 3), "contaminated water", KILLED_BY);
losehp(rnd(10), "contaminated water", KILLED_BY);
poison_strdmg(rn1(4, 3), rnd(10), "contaminated water",
KILLED_BY);
exercise(A_CON, FALSE);
break;
case 22: /* Fountain of snakes! */