unicorn horn vs deafness
Implement the suggestion that applying a non-cursed unicorn horn can cure deafness like other similar troubles. Also, applying a cursed one can cause deafness, although I made the chance be half of what it is for the other troubles since they tend to be more significant. This is entry #2 on the bugzilla list, but I haven't figured out how to update that yet.
This commit is contained in:
36
src/potion.c
36
src/potion.c
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 potion.c $NHDT-Date: 1433060654 2015/05/31 08:24:14 $ $NHDT-Branch: master $:$NHDT-Revision: 1.116 $ */
|
||||
/* NetHack 3.6 potion.c $NHDT-Date: 1440120657 2015/08/21 01:30:57 $ $NHDT-Branch: master $:$NHDT-Revision: 1.117 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -115,7 +115,7 @@ int type;
|
||||
long old = Sick;
|
||||
|
||||
#if 0
|
||||
if (Unaware) talk = FALSE;
|
||||
if (Unaware) talk = FALSE;
|
||||
#endif
|
||||
|
||||
if (xtime > 0L) {
|
||||
@@ -162,7 +162,7 @@ const char *msg;
|
||||
long old = Slimed;
|
||||
|
||||
#if 0
|
||||
if (Unaware) msg = 0;
|
||||
if (Unaware) msg = 0;
|
||||
#endif
|
||||
|
||||
if ((!xtime && old) || (xtime && !old)) {
|
||||
@@ -186,7 +186,7 @@ const char *killername;
|
||||
long old = Stoned;
|
||||
|
||||
#if 0
|
||||
if (Unaware) msg = 0;
|
||||
if (Unaware) msg = 0;
|
||||
#endif
|
||||
|
||||
if ((!xtime && old) || (xtime && !old)) {
|
||||
@@ -390,6 +390,34 @@ long mask; /* nonzero if resistance status should change by mask */
|
||||
return changed;
|
||||
}
|
||||
|
||||
void
|
||||
make_deaf(xtime, talk)
|
||||
long xtime;
|
||||
boolean talk;
|
||||
{
|
||||
long old = HDeaf;
|
||||
boolean toggled = FALSE;
|
||||
|
||||
if (Unaware)
|
||||
talk = FALSE;
|
||||
|
||||
if (!xtime && old) {
|
||||
if (talk)
|
||||
You("can hear again.");
|
||||
toggled = TRUE;
|
||||
} else if (xtime && !old) {
|
||||
if (talk)
|
||||
You("are unable to hear anything.");
|
||||
toggled = TRUE;
|
||||
}
|
||||
/* deafness isn't presently shown on status line, but
|
||||
request a status update in case that changes someday */
|
||||
if (toggled)
|
||||
context.botl = TRUE;
|
||||
|
||||
set_itimeout(&HDeaf, xtime);
|
||||
}
|
||||
|
||||
STATIC_OVL void
|
||||
ghost_from_bottle()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user