potion-from-sink and the corpsenm field
Change the code involved to use a new #define for the field, like other overloaded uses of corpsenm. Also remove one check for this field from potion.c: there are no blessed potions from sinks.
This commit is contained in:
@@ -497,7 +497,7 @@ register struct obj *obj;
|
||||
otemp.quan = 1L;
|
||||
otemp.onamelth = 0;
|
||||
otemp.oxlth = 0;
|
||||
if (objects[otemp.otyp].oc_class == POTION_CLASS && otemp.corpsenm)
|
||||
if (objects[otemp.otyp].oc_class == POTION_CLASS && otemp.fromsink)
|
||||
/* kludge, meaning it's sink water */
|
||||
Sprintf(qbuf,"Call a stream of %s fluid:",
|
||||
OBJ_DESCR(objects[otemp.otyp]));
|
||||
|
||||
@@ -549,7 +549,7 @@ drinksink()
|
||||
hcolor(OBJ_DESCR(objects[otmp->otyp])));
|
||||
otmp->dknown = !(Blind || Hallucination);
|
||||
otmp->quan++; /* Avoid panic upon useup() */
|
||||
otmp->corpsenm = 1; /* kludge for docall() */
|
||||
otmp->fromsink = 1; /* kludge for docall() */
|
||||
(void) dopotion(otmp);
|
||||
obfree(otmp, (struct obj *)0);
|
||||
break;
|
||||
|
||||
10
src/potion.c
10
src/potion.c
@@ -666,12 +666,8 @@ peffects(otmp)
|
||||
pline("(But in fact it was mildly stale %s.)",
|
||||
fruitname(TRUE));
|
||||
if (!Role_if(PM_HEALER)) {
|
||||
if (otmp->corpsenm)
|
||||
losehp(1,
|
||||
"mildly contaminated tap water", KILLED_BY);
|
||||
else
|
||||
losehp(1,
|
||||
"mildly contaminated potion", KILLED_BY_AN);
|
||||
/* NB: blessed otmp->fromsink is not possible */
|
||||
losehp(1, "mildly contaminated potion", KILLED_BY_AN);
|
||||
}
|
||||
} else {
|
||||
if(Poison_resistance)
|
||||
@@ -690,7 +686,7 @@ peffects(otmp)
|
||||
TRUE);
|
||||
}
|
||||
if(!Poison_resistance) {
|
||||
if (otmp->corpsenm)
|
||||
if (otmp->fromsink)
|
||||
losehp(rnd(10)+5*!!(otmp->cursed),
|
||||
"contaminated tap water", KILLED_BY);
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user