show deafness indicator on status line
May as well show a deafness indicator.
This commit is contained in:
+2
-1
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 botl.h $NHDT-Date: 1433105378 2015/05/31 20:49:38 $ $NHDT-Branch: status_hilite $:$NHDT-Revision: 1.14 $ */
|
/* NetHack 3.6 botl.h $NHDT-Date: 1452660165 2016/01/13 04:42:45 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.15 $ */
|
||||||
/* Copyright (c) Michael Allison, 2003 */
|
/* Copyright (c) Michael Allison, 2003 */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
@@ -69,6 +69,7 @@ BL_EXP, BL_CONDITION };
|
|||||||
#define BL_MASK_HALLU 0x00000010L
|
#define BL_MASK_HALLU 0x00000010L
|
||||||
#define BL_MASK_STUNNED 0x00000020L
|
#define BL_MASK_STUNNED 0x00000020L
|
||||||
#define BL_MASK_SLIMED 0x00000040L
|
#define BL_MASK_SLIMED 0x00000040L
|
||||||
|
#define BL_MASK_DEAF 0x00000080L
|
||||||
/* clang-format on */
|
/* clang-format on */
|
||||||
|
|
||||||
#define REASSESS_ONLY TRUE
|
#define REASSESS_ONLY TRUE
|
||||||
|
|||||||
+2
-1
@@ -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. */
|
/* 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. */
|
||||||
|
|
||||||
@@ -1780,6 +1780,7 @@ struct obj *obj;
|
|||||||
if (Deaf) /* make_deaf() won't give feedback when already deaf */
|
if (Deaf) /* make_deaf() won't give feedback when already deaf */
|
||||||
pline("Nothing seems to happen.");
|
pline("Nothing seems to happen.");
|
||||||
make_deaf((HDeaf & TIMEOUT) + lcount, TRUE);
|
make_deaf((HDeaf & TIMEOUT) + lcount, TRUE);
|
||||||
|
context.botl = TRUE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
|||||||
+8
-1
@@ -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. */
|
/* 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. */
|
||||||
|
|
||||||
@@ -122,6 +122,8 @@ bot2()
|
|||||||
Sprintf(nb = eos(nb), " Hallu");
|
Sprintf(nb = eos(nb), " Hallu");
|
||||||
if (Slimed)
|
if (Slimed)
|
||||||
Sprintf(nb = eos(nb), " Slime");
|
Sprintf(nb = eos(nb), " Slime");
|
||||||
|
if (Deaf)
|
||||||
|
Sprintf(nb = eos(nb), " Df");
|
||||||
if (cap > UNENCUMBERED)
|
if (cap > UNENCUMBERED)
|
||||||
Sprintf(nb = eos(nb), " %s", enc_stat[cap]);
|
Sprintf(nb = eos(nb), " %s", enc_stat[cap]);
|
||||||
curs(WIN_STATUS, 1, 1);
|
curs(WIN_STATUS, 1, 1);
|
||||||
@@ -543,6 +545,11 @@ bot()
|
|||||||
else
|
else
|
||||||
blstats[idx][BL_CONDITION].a.a_ulong &= ~BL_MASK_BLIND;
|
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)
|
if (Confusion)
|
||||||
blstats[idx][BL_CONDITION].a.a_ulong |= BL_MASK_CONF;
|
blstats[idx][BL_CONDITION].a.a_ulong |= BL_MASK_CONF;
|
||||||
else
|
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. */
|
/* 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. */
|
||||||
|
|
||||||
@@ -1140,6 +1140,7 @@ wiz_intrinsic(VOID_ARGS)
|
|||||||
if (!strcmp(intrinsics[i],"deafness")) {
|
if (!strcmp(intrinsics[i],"deafness")) {
|
||||||
You("go deaf.");
|
You("go deaf.");
|
||||||
incr_itimeout(&HDeaf, 30);
|
incr_itimeout(&HDeaf, 30);
|
||||||
|
context.botl = TRUE;
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
pline("Unavailable command '%s'.",
|
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. */
|
/* 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. */
|
||||||
|
|
||||||
@@ -1479,8 +1479,10 @@ int
|
|||||||
Hear_again(VOID_ARGS)
|
Hear_again(VOID_ARGS)
|
||||||
{
|
{
|
||||||
/* Chance of deafness going away while fainted/sleeping/etc. */
|
/* Chance of deafness going away while fainted/sleeping/etc. */
|
||||||
if (!rn2(2))
|
if (!rn2(2)) {
|
||||||
make_deaf(0L, FALSE);
|
make_deaf(0L, FALSE);
|
||||||
|
context.botl = TRUE;
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1514,6 +1516,7 @@ struct obj *obj;
|
|||||||
where = (u.usteed) ? "saddle" : surface(u.ux, u.uy);
|
where = (u.usteed) ? "saddle" : surface(u.ux, u.uy);
|
||||||
pline_The("world spins and %s %s.", what, where);
|
pline_The("world spins and %s %s.", what, where);
|
||||||
incr_itimeout(&HDeaf, duration);
|
incr_itimeout(&HDeaf, duration);
|
||||||
|
context.botl = TRUE;
|
||||||
nomul(-duration);
|
nomul(-duration);
|
||||||
multi_reason = "unconscious from rotten food";
|
multi_reason = "unconscious from rotten food";
|
||||||
nomovemsg = "You are conscious again.";
|
nomovemsg = "You are conscious again.";
|
||||||
@@ -2839,6 +2842,7 @@ boolean incr;
|
|||||||
stop_occupation();
|
stop_occupation();
|
||||||
You("faint from lack of food.");
|
You("faint from lack of food.");
|
||||||
incr_itimeout(&HDeaf, duration);
|
incr_itimeout(&HDeaf, duration);
|
||||||
|
context.botl = TRUE;
|
||||||
nomul(-duration);
|
nomul(-duration);
|
||||||
multi_reason = "fainted from lack of food";
|
multi_reason = "fainted from lack of food";
|
||||||
nomovemsg = "You regain consciousness.";
|
nomovemsg = "You regain consciousness.";
|
||||||
|
|||||||
+2
-1
@@ -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 */
|
/* Copyright (c) 1989 by Jean-Christophe Collet */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
@@ -567,6 +567,7 @@ struct obj *instr;
|
|||||||
awaken_monsters(u.ulevel * 40);
|
awaken_monsters(u.ulevel * 40);
|
||||||
incr_itimeout(&HDeaf, rn1(20, 30));
|
incr_itimeout(&HDeaf, rn1(20, 30));
|
||||||
exercise(A_WIS, FALSE);
|
exercise(A_WIS, FALSE);
|
||||||
|
context.botl = TRUE;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
impossible("What a weird instrument (%d)!", instr->otyp);
|
impossible("What a weird instrument (%d)!", instr->otyp);
|
||||||
|
|||||||
+2
-3
@@ -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. */
|
/* 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. */
|
||||||
|
|
||||||
@@ -410,8 +410,7 @@ boolean talk;
|
|||||||
You("are unable to hear anything.");
|
You("are unable to hear anything.");
|
||||||
toggled = TRUE;
|
toggled = TRUE;
|
||||||
}
|
}
|
||||||
/* deafness isn't presently shown on status line, but
|
/* request a status update */
|
||||||
request a status update in case that changes someday */
|
|
||||||
if (toggled)
|
if (toggled)
|
||||||
context.botl = TRUE;
|
context.botl = TRUE;
|
||||||
|
|
||||||
|
|||||||
+4
-1
@@ -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. */
|
/* 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. */
|
||||||
|
|
||||||
@@ -345,6 +345,7 @@ nh_timeout()
|
|||||||
case DEAF:
|
case DEAF:
|
||||||
set_itimeout(&HDeaf, 1L);
|
set_itimeout(&HDeaf, 1L);
|
||||||
make_deaf(0L, TRUE);
|
make_deaf(0L, TRUE);
|
||||||
|
context.botl = TRUE;
|
||||||
if (!Deaf)
|
if (!Deaf)
|
||||||
stop_occupation();
|
stop_occupation();
|
||||||
break;
|
break;
|
||||||
@@ -443,6 +444,7 @@ boolean wakeup_msg;
|
|||||||
/* caller can follow with a direct call to Hear_again() if
|
/* caller can follow with a direct call to Hear_again() if
|
||||||
there's a need to override this when wakeup_msg is true */
|
there's a need to override this when wakeup_msg is true */
|
||||||
incr_itimeout(&HDeaf, how_long);
|
incr_itimeout(&HDeaf, how_long);
|
||||||
|
context.botl = TRUE;
|
||||||
afternmv = Hear_again; /* this won't give any messages */
|
afternmv = Hear_again; /* this won't give any messages */
|
||||||
}
|
}
|
||||||
/* early wakeup from combat won't be possible until next monster turn */
|
/* 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. */
|
/* Even if already deaf, we sense the thunder's vibrations. */
|
||||||
pline("Kaboom!!! Boom!! Boom!!");
|
pline("Kaboom!!! Boom!! Boom!!");
|
||||||
incr_itimeout(&HDeaf, rn1(20, 30));
|
incr_itimeout(&HDeaf, rn1(20, 30));
|
||||||
|
context.botl = TRUE;
|
||||||
if (!u.uinvulnerable) {
|
if (!u.uinvulnerable) {
|
||||||
stop_occupation();
|
stop_occupation();
|
||||||
nomul(-3);
|
nomul(-3);
|
||||||
|
|||||||
+3
-1
@@ -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. */
|
/* 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. */
|
||||||
|
|
||||||
@@ -3066,10 +3066,12 @@ domagictrap()
|
|||||||
if (!Deaf) {
|
if (!Deaf) {
|
||||||
You_hear("a deafening roar!");
|
You_hear("a deafening roar!");
|
||||||
incr_itimeout(&HDeaf, rn1(20, 30));
|
incr_itimeout(&HDeaf, rn1(20, 30));
|
||||||
|
context.botl = TRUE;
|
||||||
} else {
|
} else {
|
||||||
/* magic vibrations still hit you */
|
/* magic vibrations still hit you */
|
||||||
You_feel("rankled.");
|
You_feel("rankled.");
|
||||||
incr_itimeout(&HDeaf, rn1(5, 15));
|
incr_itimeout(&HDeaf, rn1(5, 15));
|
||||||
|
context.botl = TRUE;
|
||||||
}
|
}
|
||||||
while (cnt--)
|
while (cnt--)
|
||||||
(void) makemon((struct permonst *) 0, u.ux, u.uy, NO_MM_FLAGS);
|
(void) makemon((struct permonst *) 0, u.ux, u.uy, NO_MM_FLAGS);
|
||||||
|
|||||||
Reference in New Issue
Block a user