fix #H9420 - dipping while blind
Fix several feedback anomalies for dipping into potions.
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.177 $ $NHDT-Date: 1573778559 2019/11/15 00:42:39 $
|
$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.178 $ $NHDT-Date: 1573848574 2019/11/15 20:09:34 $
|
||||||
|
|
||||||
This fixes36.3 file is here to capture information about updates in the 3.6.x
|
This fixes36.3 file is here to capture information about updates in the 3.6.x
|
||||||
lineage following the release of 3.6.2 in May 2019. Please note, however,
|
lineage following the release of 3.6.2 in May 2019. Please note, however,
|
||||||
@@ -225,6 +225,13 @@ putting on gloves while having slippery fingers transfered slipperiness to
|
|||||||
when a monster reads a scroll of fire to cure sliming, don't access that
|
when a monster reads a scroll of fire to cure sliming, don't access that
|
||||||
scroll's memory after it has been used up (bcsign)
|
scroll's memory after it has been used up (bcsign)
|
||||||
monster vs monster attacks didn't handle shades or silver weapon feedback
|
monster vs monster attacks didn't handle shades or silver weapon feedback
|
||||||
|
successful alchemy would show new potion's description (color) even when blind
|
||||||
|
dipping some types of objects into oil would yield "<object> gleams with an
|
||||||
|
oily sheen" even when blind
|
||||||
|
dipping into an undiscovered potion would offer chance to give a name to the
|
||||||
|
potion even when its description wasn't known (picked up while blind)
|
||||||
|
dipping lichen corpse into acid when not blind and acid was undicovered would
|
||||||
|
not offer a chance to give a name to the potion after lichen feedback
|
||||||
|
|
||||||
|
|
||||||
Fixes to Post-3.6.2 Problems that Were Exposed Via git Repository
|
Fixes to Post-3.6.2 Problems that Were Exposed Via git Repository
|
||||||
|
|||||||
64
src/potion.c
64
src/potion.c
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 potion.c $NHDT-Date: 1573346191 2019/11/10 00:36:31 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.166 $ */
|
/* NetHack 3.6 potion.c $NHDT-Date: 1573848199 2019/11/15 20:03:19 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.167 $ */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/*-Copyright (c) Robert Patrick Rankin, 2013. */
|
/*-Copyright (c) Robert Patrick Rankin, 2013. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
@@ -2030,7 +2030,7 @@ dodip()
|
|||||||
around for potionbreathe() [and we can't set obj->in_use
|
around for potionbreathe() [and we can't set obj->in_use
|
||||||
to 'amt' because that's not implemented] */
|
to 'amt' because that's not implemented] */
|
||||||
obj->in_use = 1;
|
obj->in_use = 1;
|
||||||
pline("BOOM! They explode!");
|
pline("%sThey explode!", !Deaf ? "BOOM! " : "");
|
||||||
wake_nearto(u.ux, u.uy, (BOLT_LIM + 1) * (BOLT_LIM + 1));
|
wake_nearto(u.ux, u.uy, (BOLT_LIM + 1) * (BOLT_LIM + 1));
|
||||||
exercise(A_STR, FALSE);
|
exercise(A_STR, FALSE);
|
||||||
if (!breathless(youmonst.data) || haseyes(youmonst.data))
|
if (!breathless(youmonst.data) || haseyes(youmonst.data))
|
||||||
@@ -2048,6 +2048,8 @@ dodip()
|
|||||||
if (mixture != STRANGE_OBJECT) {
|
if (mixture != STRANGE_OBJECT) {
|
||||||
obj->otyp = mixture;
|
obj->otyp = mixture;
|
||||||
} else {
|
} else {
|
||||||
|
struct obj *otmp;
|
||||||
|
|
||||||
switch (obj->odiluted ? 1 : rnd(8)) {
|
switch (obj->odiluted ? 1 : rnd(8)) {
|
||||||
case 1:
|
case 1:
|
||||||
obj->otyp = POT_WATER;
|
obj->otyp = POT_WATER;
|
||||||
@@ -2056,17 +2058,15 @@ dodip()
|
|||||||
case 3:
|
case 3:
|
||||||
obj->otyp = POT_SICKNESS;
|
obj->otyp = POT_SICKNESS;
|
||||||
break;
|
break;
|
||||||
case 4: {
|
case 4:
|
||||||
struct obj *otmp = mkobj(POTION_CLASS, FALSE);
|
otmp = mkobj(POTION_CLASS, FALSE);
|
||||||
|
|
||||||
obj->otyp = otmp->otyp;
|
obj->otyp = otmp->otyp;
|
||||||
obfree(otmp, (struct obj *) 0);
|
obfree(otmp, (struct obj *) 0);
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
default:
|
default:
|
||||||
useupall(obj);
|
useupall(obj);
|
||||||
if (!Blind)
|
pline_The("mixture %sevaporates.",
|
||||||
pline_The("mixture glows brightly and evaporates.");
|
!Blind ? "glows brightly and " : "");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2092,11 +2092,16 @@ dodip()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (potion->otyp == POT_ACID && obj->otyp == CORPSE
|
if (potion->otyp == POT_ACID && obj->otyp == CORPSE
|
||||||
&& obj->corpsenm == PM_LICHEN && !Blind) {
|
&& obj->corpsenm == PM_LICHEN) {
|
||||||
pline("%s %s %s around the edges.", The(cxname(obj)),
|
pline("%s %s %s around the edges.", The(cxname(obj)),
|
||||||
otense(obj, "turn"),
|
otense(obj, "turn"), Blind ? "wrinkled"
|
||||||
potion->odiluted ? hcolor(NH_ORANGE) : hcolor(NH_RED));
|
: potion->odiluted ? hcolor(NH_ORANGE)
|
||||||
|
: hcolor(NH_RED));
|
||||||
potion->in_use = FALSE; /* didn't go poof */
|
potion->in_use = FALSE; /* didn't go poof */
|
||||||
|
if (potion->dknown
|
||||||
|
&& !objects[potion->otyp].oc_name_known
|
||||||
|
&& !objects[potion->otyp].oc_uname)
|
||||||
|
docall(potion);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2150,10 +2155,14 @@ dodip()
|
|||||||
} else if ((!is_rustprone(obj) && !is_corrodeable(obj))
|
} else if ((!is_rustprone(obj) && !is_corrodeable(obj))
|
||||||
|| is_ammo(obj) || (!obj->oeroded && !obj->oeroded2)) {
|
|| is_ammo(obj) || (!obj->oeroded && !obj->oeroded2)) {
|
||||||
/* uses up potion, doesn't set obj->greased */
|
/* uses up potion, doesn't set obj->greased */
|
||||||
pline("%s %s with an oily sheen.", Yname2(obj),
|
if (!Blind)
|
||||||
otense(obj, "gleam"));
|
pline("%s %s with an oily sheen.", Yname2(obj),
|
||||||
|
otense(obj, "gleam"));
|
||||||
|
else /*if (!uarmg)*/
|
||||||
|
pline("%s %s oily.", Yname2(obj), otense(obj, "feel"));
|
||||||
} else {
|
} else {
|
||||||
pline("%s %s less %s.", Yname2(obj), otense(obj, "are"),
|
pline("%s %s less %s.", Yname2(obj),
|
||||||
|
otense(obj, !Blind ? "are" : "feel"),
|
||||||
(obj->oeroded && obj->oeroded2)
|
(obj->oeroded && obj->oeroded2)
|
||||||
? "corroded and rusty"
|
? "corroded and rusty"
|
||||||
: obj->oeroded ? "rusty" : "corroded");
|
: obj->oeroded ? "rusty" : "corroded");
|
||||||
@@ -2164,7 +2173,8 @@ dodip()
|
|||||||
wisx = TRUE;
|
wisx = TRUE;
|
||||||
}
|
}
|
||||||
exercise(A_WIS, wisx);
|
exercise(A_WIS, wisx);
|
||||||
makeknown(potion->otyp);
|
if (potion->dknown)
|
||||||
|
makeknown(potion->otyp);
|
||||||
useup(potion);
|
useup(potion);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@@ -2200,7 +2210,8 @@ dodip()
|
|||||||
useup(potion);
|
useup(potion);
|
||||||
exercise(A_WIS, TRUE);
|
exercise(A_WIS, TRUE);
|
||||||
}
|
}
|
||||||
makeknown(POT_OIL);
|
if (potion->dknown)
|
||||||
|
makeknown(POT_OIL);
|
||||||
obj->spe = 1;
|
obj->spe = 1;
|
||||||
update_inventory();
|
update_inventory();
|
||||||
return 1;
|
return 1;
|
||||||
@@ -2238,16 +2249,24 @@ dodip()
|
|||||||
singlepotion->dknown = FALSE;
|
singlepotion->dknown = FALSE;
|
||||||
} else {
|
} else {
|
||||||
singlepotion->dknown = !Hallucination;
|
singlepotion->dknown = !Hallucination;
|
||||||
|
*newbuf = '\0';
|
||||||
if (mixture == POT_WATER && singlepotion->dknown)
|
if (mixture == POT_WATER && singlepotion->dknown)
|
||||||
Sprintf(newbuf, "clears");
|
Sprintf(newbuf, "clears");
|
||||||
else
|
else if (!Blind)
|
||||||
Sprintf(newbuf, "turns %s",
|
Sprintf(newbuf, "turns %s",
|
||||||
hcolor(OBJ_DESCR(objects[mixture])));
|
hcolor(OBJ_DESCR(objects[mixture])));
|
||||||
pline_The("%spotion%s %s.", oldbuf,
|
if (*newbuf)
|
||||||
more_than_one ? " that you dipped into" : "", newbuf);
|
pline_The("%spotion%s %s.", oldbuf,
|
||||||
if (!objects[old_otyp].oc_uname
|
more_than_one ? " that you dipped into" : "",
|
||||||
&& !objects[old_otyp].oc_name_known && old_dknown) {
|
newbuf);
|
||||||
|
else
|
||||||
|
pline("Somehing happens.");
|
||||||
|
|
||||||
|
if (old_dknown
|
||||||
|
&& !objects[old_otyp].oc_name_known
|
||||||
|
&& !objects[old_otyp].oc_uname) {
|
||||||
struct obj fakeobj;
|
struct obj fakeobj;
|
||||||
|
|
||||||
fakeobj = zeroobj;
|
fakeobj = zeroobj;
|
||||||
fakeobj.dknown = 1;
|
fakeobj.dknown = 1;
|
||||||
fakeobj.otyp = old_otyp;
|
fakeobj.otyp = old_otyp;
|
||||||
@@ -2269,7 +2288,8 @@ dodip()
|
|||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
poof:
|
poof:
|
||||||
if (!objects[potion->otyp].oc_name_known
|
if (potion->dknown
|
||||||
|
&& !objects[potion->otyp].oc_name_known
|
||||||
&& !objects[potion->otyp].oc_uname)
|
&& !objects[potion->otyp].oc_uname)
|
||||||
docall(potion);
|
docall(potion);
|
||||||
useup(potion);
|
useup(potion);
|
||||||
|
|||||||
Reference in New Issue
Block a user