healing vapor vs blindness
Drinking any potion full healing or extra healing or non-cursed potion of healing cures blindness in addition to restoring lost hit points. Now breathing vapor from any potion of full healing or non-cursed potion of extra healing or blessed potion of healing will also do so.
This commit is contained in:
+24
-7
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 potion.c $NHDT-Date: 1501725406 2017/08/03 01:56:46 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.137 $ */
|
/* NetHack 3.6 potion.c $NHDT-Date: 1502753790 2017/08/14 23:36:30 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.138 $ */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
@@ -1343,15 +1343,22 @@ boolean your_fault;
|
|||||||
if (useeit && !affected)
|
if (useeit && !affected)
|
||||||
pline("%s %s wet.", buf, aobjnam(saddle, "get"));
|
pline("%s %s wet.", buf, aobjnam(saddle, "get"));
|
||||||
} else {
|
} else {
|
||||||
boolean angermon = your_fault;
|
boolean angermon = your_fault, cureblind = FALSE;
|
||||||
|
|
||||||
switch (obj->otyp) {
|
switch (obj->otyp) {
|
||||||
case POT_HEALING:
|
|
||||||
case POT_EXTRA_HEALING:
|
|
||||||
case POT_FULL_HEALING:
|
case POT_FULL_HEALING:
|
||||||
|
cureblind = TRUE;
|
||||||
|
/*FALLTHRU*/
|
||||||
|
case POT_EXTRA_HEALING:
|
||||||
|
if (!obj->cursed)
|
||||||
|
cureblind = TRUE;
|
||||||
|
/*FALLTHRU*/
|
||||||
|
case POT_HEALING:
|
||||||
|
if (obj->blessed)
|
||||||
|
cureblind = TRUE;
|
||||||
if (mon->data == &mons[PM_PESTILENCE])
|
if (mon->data == &mons[PM_PESTILENCE])
|
||||||
goto do_illness;
|
goto do_illness;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case POT_RESTORE_ABILITY:
|
case POT_RESTORE_ABILITY:
|
||||||
case POT_GAIN_ABILITY:
|
case POT_GAIN_ABILITY:
|
||||||
do_healing:
|
do_healing:
|
||||||
@@ -1361,6 +1368,8 @@ boolean your_fault;
|
|||||||
if (canseemon(mon))
|
if (canseemon(mon))
|
||||||
pline("%s looks sound and hale again.", Monnam(mon));
|
pline("%s looks sound and hale again.", Monnam(mon));
|
||||||
}
|
}
|
||||||
|
if (cureblind)
|
||||||
|
mcureblindness(mon, canseemon(mon));
|
||||||
break;
|
break;
|
||||||
case POT_SICKNESS:
|
case POT_SICKNESS:
|
||||||
if (mon->data == &mons[PM_PESTILENCE])
|
if (mon->data == &mons[PM_PESTILENCE])
|
||||||
@@ -1419,7 +1428,7 @@ boolean your_fault;
|
|||||||
break;
|
break;
|
||||||
case POT_BLINDNESS:
|
case POT_BLINDNESS:
|
||||||
if (haseyes(mon->data)) {
|
if (haseyes(mon->data)) {
|
||||||
register int btmp = 64 + rn2(32)
|
int btmp = 64 + rn2(32)
|
||||||
+ rn2(32) * !resist(mon, POTION_CLASS, 0, NOTELL);
|
+ rn2(32) * !resist(mon, POTION_CLASS, 0, NOTELL);
|
||||||
|
|
||||||
btmp += mon->mblinded;
|
btmp += mon->mblinded;
|
||||||
@@ -1534,7 +1543,8 @@ void
|
|||||||
potionbreathe(obj)
|
potionbreathe(obj)
|
||||||
register struct obj *obj;
|
register struct obj *obj;
|
||||||
{
|
{
|
||||||
register int i, ii, isdone, kn = 0;
|
int i, ii, isdone, kn = 0;
|
||||||
|
boolean cureblind = FALSE;
|
||||||
|
|
||||||
switch (obj->otyp) {
|
switch (obj->otyp) {
|
||||||
case POT_RESTORE_ABILITY:
|
case POT_RESTORE_ABILITY:
|
||||||
@@ -1569,18 +1579,25 @@ register struct obj *obj;
|
|||||||
u.mh++, context.botl = 1;
|
u.mh++, context.botl = 1;
|
||||||
if (u.uhp < u.uhpmax)
|
if (u.uhp < u.uhpmax)
|
||||||
u.uhp++, context.botl = 1;
|
u.uhp++, context.botl = 1;
|
||||||
|
cureblind = TRUE;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case POT_EXTRA_HEALING:
|
case POT_EXTRA_HEALING:
|
||||||
if (Upolyd && u.mh < u.mhmax)
|
if (Upolyd && u.mh < u.mhmax)
|
||||||
u.mh++, context.botl = 1;
|
u.mh++, context.botl = 1;
|
||||||
if (u.uhp < u.uhpmax)
|
if (u.uhp < u.uhpmax)
|
||||||
u.uhp++, context.botl = 1;
|
u.uhp++, context.botl = 1;
|
||||||
|
if (!obj->cursed)
|
||||||
|
cureblind = TRUE;
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case POT_HEALING:
|
case POT_HEALING:
|
||||||
if (Upolyd && u.mh < u.mhmax)
|
if (Upolyd && u.mh < u.mhmax)
|
||||||
u.mh++, context.botl = 1;
|
u.mh++, context.botl = 1;
|
||||||
if (u.uhp < u.uhpmax)
|
if (u.uhp < u.uhpmax)
|
||||||
u.uhp++, context.botl = 1;
|
u.uhp++, context.botl = 1;
|
||||||
|
if (obj->blessed)
|
||||||
|
cureblind = TRUE;
|
||||||
|
if (cureblind)
|
||||||
|
make_blinded(0L, !u.ucreamed);
|
||||||
exercise(A_CON, TRUE);
|
exercise(A_CON, TRUE);
|
||||||
break;
|
break;
|
||||||
case POT_SICKNESS:
|
case POT_SICKNESS:
|
||||||
|
|||||||
Reference in New Issue
Block a user