show deafness indicator on status line
May as well show a deafness indicator.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 apply.c $NHDT-Date: 1450582748 2015/12/20 03:39:08 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.217 $ */
|
||||
/* NetHack 3.6 apply.c $NHDT-Date: 1452660177 2016/01/13 04:42:57 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.219 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -1780,6 +1780,7 @@ struct obj *obj;
|
||||
if (Deaf) /* make_deaf() won't give feedback when already deaf */
|
||||
pline("Nothing seems to happen.");
|
||||
make_deaf((HDeaf & TIMEOUT) + lcount, TRUE);
|
||||
context.botl = TRUE;
|
||||
break;
|
||||
}
|
||||
return;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 botl.c $NHDT-Date: 1447978683 2015/11/20 00:18:03 $ $NHDT-Branch: master $:$NHDT-Revision: 1.69 $ */
|
||||
/* NetHack 3.6 botl.c $NHDT-Date: 1452660188 2016/01/13 04:43:08 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.70 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -122,6 +122,8 @@ bot2()
|
||||
Sprintf(nb = eos(nb), " Hallu");
|
||||
if (Slimed)
|
||||
Sprintf(nb = eos(nb), " Slime");
|
||||
if (Deaf)
|
||||
Sprintf(nb = eos(nb), " Df");
|
||||
if (cap > UNENCUMBERED)
|
||||
Sprintf(nb = eos(nb), " %s", enc_stat[cap]);
|
||||
curs(WIN_STATUS, 1, 1);
|
||||
@@ -543,6 +545,11 @@ bot()
|
||||
else
|
||||
blstats[idx][BL_CONDITION].a.a_ulong &= ~BL_MASK_BLIND;
|
||||
|
||||
if (Deaf)
|
||||
blstats[idx][BL_CONDITION].a.a_ulong |= BL_MASK_DEAF;
|
||||
else
|
||||
blstats[idx][BL_CONDITION].a.a_ulong &= ~BL_MASK_DEAF;
|
||||
|
||||
if (Confusion)
|
||||
blstats[idx][BL_CONDITION].a.a_ulong |= BL_MASK_CONF;
|
||||
else
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 cmd.c $NHDT-Date: 1452123457 2016/01/06 23:37:37 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.216 $ */
|
||||
/* NetHack 3.6 cmd.c $NHDT-Date: 1452660189 2016/01/13 04:43:09 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.219 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -1140,6 +1140,7 @@ wiz_intrinsic(VOID_ARGS)
|
||||
if (!strcmp(intrinsics[i],"deafness")) {
|
||||
You("go deaf.");
|
||||
incr_itimeout(&HDeaf, 30);
|
||||
context.botl = TRUE;
|
||||
}
|
||||
} else
|
||||
pline("Unavailable command '%s'.",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 eat.c $NHDT-Date: 1451086430 2015/12/25 23:33:50 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.157 $ */
|
||||
/* NetHack 3.6 eat.c $NHDT-Date: 1452660191 2016/01/13 04:43:11 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.161 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -1479,8 +1479,10 @@ int
|
||||
Hear_again(VOID_ARGS)
|
||||
{
|
||||
/* Chance of deafness going away while fainted/sleeping/etc. */
|
||||
if (!rn2(2))
|
||||
if (!rn2(2)) {
|
||||
make_deaf(0L, FALSE);
|
||||
context.botl = TRUE;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1514,6 +1516,7 @@ struct obj *obj;
|
||||
where = (u.usteed) ? "saddle" : surface(u.ux, u.uy);
|
||||
pline_The("world spins and %s %s.", what, where);
|
||||
incr_itimeout(&HDeaf, duration);
|
||||
context.botl = TRUE;
|
||||
nomul(-duration);
|
||||
multi_reason = "unconscious from rotten food";
|
||||
nomovemsg = "You are conscious again.";
|
||||
@@ -2839,6 +2842,7 @@ boolean incr;
|
||||
stop_occupation();
|
||||
You("faint from lack of food.");
|
||||
incr_itimeout(&HDeaf, duration);
|
||||
context.botl = TRUE;
|
||||
nomul(-duration);
|
||||
multi_reason = "fainted from lack of food";
|
||||
nomovemsg = "You regain consciousness.";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 music.c $NHDT-Date: 1446808448 2015/11/06 11:14:08 $ $NHDT-Branch: master $:$NHDT-Revision: 1.40 $ */
|
||||
/* NetHack 3.6 music.c $NHDT-Date: 1452660194 2016/01/13 04:43:14 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.42 $ */
|
||||
/* Copyright (c) 1989 by Jean-Christophe Collet */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -567,6 +567,7 @@ struct obj *instr;
|
||||
awaken_monsters(u.ulevel * 40);
|
||||
incr_itimeout(&HDeaf, rn1(20, 30));
|
||||
exercise(A_WIS, FALSE);
|
||||
context.botl = TRUE;
|
||||
break;
|
||||
default:
|
||||
impossible("What a weird instrument (%d)!", instr->otyp);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 potion.c $NHDT-Date: 1450667491 2015/12/21 03:11:31 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.124 $ */
|
||||
/* NetHack 3.6 potion.c $NHDT-Date: 1452660195 2016/01/13 04:43:15 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.126 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -410,8 +410,7 @@ boolean 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 */
|
||||
/* request a status update */
|
||||
if (toggled)
|
||||
context.botl = TRUE;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 timeout.c $NHDT-Date: 1446861771 2015/11/07 02:02:51 $ $NHDT-Branch: master $:$NHDT-Revision: 1.63 $ */
|
||||
/* NetHack 3.6 timeout.c $NHDT-Date: 1452660198 2016/01/13 04:43:18 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.64 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -345,6 +345,7 @@ nh_timeout()
|
||||
case DEAF:
|
||||
set_itimeout(&HDeaf, 1L);
|
||||
make_deaf(0L, TRUE);
|
||||
context.botl = TRUE;
|
||||
if (!Deaf)
|
||||
stop_occupation();
|
||||
break;
|
||||
@@ -443,6 +444,7 @@ boolean wakeup_msg;
|
||||
/* caller can follow with a direct call to Hear_again() if
|
||||
there's a need to override this when wakeup_msg is true */
|
||||
incr_itimeout(&HDeaf, how_long);
|
||||
context.botl = TRUE;
|
||||
afternmv = Hear_again; /* this won't give any messages */
|
||||
}
|
||||
/* early wakeup from combat won't be possible until next monster turn */
|
||||
@@ -1288,6 +1290,7 @@ do_storms()
|
||||
/* Even if already deaf, we sense the thunder's vibrations. */
|
||||
pline("Kaboom!!! Boom!! Boom!!");
|
||||
incr_itimeout(&HDeaf, rn1(20, 30));
|
||||
context.botl = TRUE;
|
||||
if (!u.uinvulnerable) {
|
||||
stop_occupation();
|
||||
nomul(-3);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 trap.c $NHDT-Date: 1452039453 2016/01/06 00:17:33 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.253 $ */
|
||||
/* NetHack 3.6 trap.c $NHDT-Date: 1452660199 2016/01/13 04:43:19 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.255 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -3066,10 +3066,12 @@ domagictrap()
|
||||
if (!Deaf) {
|
||||
You_hear("a deafening roar!");
|
||||
incr_itimeout(&HDeaf, rn1(20, 30));
|
||||
context.botl = TRUE;
|
||||
} else {
|
||||
/* magic vibrations still hit you */
|
||||
You_feel("rankled.");
|
||||
incr_itimeout(&HDeaf, rn1(5, 15));
|
||||
context.botl = TRUE;
|
||||
}
|
||||
while (cnt--)
|
||||
(void) makemon((struct permonst *) 0, u.ux, u.uy, NO_MM_FLAGS);
|
||||
|
||||
Reference in New Issue
Block a user