diff --git a/include/botl.h b/include/botl.h index 8945fa293..994b41009 100644 --- a/include/botl.h +++ b/include/botl.h @@ -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 */ /* 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_STUNNED 0x00000020L #define BL_MASK_SLIMED 0x00000040L +#define BL_MASK_DEAF 0x00000080L /* clang-format on */ #define REASSESS_ONLY TRUE diff --git a/src/apply.c b/src/apply.c index 0136421d3..339f7f6d0 100644 --- a/src/apply.c +++ b/src/apply.c @@ -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; diff --git a/src/botl.c b/src/botl.c index 422f6d4ef..261686a87 100644 --- a/src/botl.c +++ b/src/botl.c @@ -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 diff --git a/src/cmd.c b/src/cmd.c index ee1db8602..47cdf8a2e 100644 --- a/src/cmd.c +++ b/src/cmd.c @@ -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'.", diff --git a/src/eat.c b/src/eat.c index 13a394405..265a868c3 100644 --- a/src/eat.c +++ b/src/eat.c @@ -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."; diff --git a/src/music.c b/src/music.c index 73b855bc1..f21a19483 100644 --- a/src/music.c +++ b/src/music.c @@ -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); diff --git a/src/potion.c b/src/potion.c index c18c560b9..2a54d5fa1 100644 --- a/src/potion.c +++ b/src/potion.c @@ -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; diff --git a/src/timeout.c b/src/timeout.c index e50ae39b2..7370b8b05 100644 --- a/src/timeout.c +++ b/src/timeout.c @@ -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); diff --git a/src/trap.c b/src/trap.c index 71700c6c8..80f638e90 100644 --- a/src/trap.c +++ b/src/trap.c @@ -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);