level-drain resistance wasn't shown during enlightenment if it was conferred
by worn/wielded equipment
wizard mode enlightenment now shows more reasons for various intrinsics
+rehumanizing after being poly'd into vampire left hero with ability to sense
+ humans and elves
+Warn_of_mon wouldn't have been able to sense giant ants if any creature were
+ to have that ability, caused by using 0 instead of NON_PM for 'none'
Platform- and/or Interface-Specific Fixes
-/* NetHack 3.6 cmd.c $NHDT-Date: 1450473780 2015/12/18 21:23:00 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.211 $ */
+/* NetHack 3.6 cmd.c $NHDT-Date: 1451082253 2015/12/25 22:24:13 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.212 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
: "certain monsters");
you_are(buf, "");
}
- if (Warn_of_mon && context.warntype.speciesidx) {
+ if (Warn_of_mon && context.warntype.speciesidx >= LOW_PM) {
Sprintf(buf, "aware of the presence of %s",
makeplural(mons[context.warntype.speciesidx].mname));
you_are(buf, from_what(WARN_OF_MON));
-/* NetHack 3.6 polyself.c $NHDT-Date: 1448496566 2015/11/26 00:09:26 $ $NHDT-Branch: master $:$NHDT-Revision: 1.104 $ */
+/* NetHack 3.6 polyself.c $NHDT-Date: 1451082254 2015/12/25 22:24:14 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.105 $ */
/* Copyright (C) 1987, 1988, 1989 by Ken Arromdee */
/* NetHack may be freely redistributed. See license for details. */
STATIC_DCL void NDECL(uunstick);
STATIC_DCL int FDECL(armor_to_dragon, (int));
STATIC_DCL void NDECL(newman);
-STATIC_DCL boolean FDECL(polysense, (struct permonst *));
+STATIC_DCL void NDECL(polysense);
STATIC_VAR const char no_longer_petrify_resistant[] =
"No longer petrify-resistant, you";
#ifdef STATUS_VIA_WINDOWPORT
status_initialize(REASSESS_ONLY);
#endif
+
+ polysense();
}
/* Levitation overrides Flying; set or clear BFlying|I_SPECIAL */
Strcpy(killer.name, "unsuccessful polymorph");
done(DIED);
newuhs(FALSE);
- (void) polysense(youmonst.data);
return; /* lifesaved */
}
}
make_slimed(10L, (const char *) 0);
}
- (void) polysense(youmonst.data);
context.botl = 1;
see_monsters();
(void) encumber_msg();
u.utrap = 0;
}
check_strangling(TRUE); /* maybe start strangling */
- (void) polysense(youmonst.data);
context.botl = 1;
vision_full_recalc = 1;
}
}
-/*
- * Some species have awareness of other species
- */
-static boolean
-polysense(mptr)
-struct permonst *mptr;
+/* some species have awareness of other species */
+static void
+polysense()
{
- short warnidx = 0;
+ short warnidx = NON_PM;
- context.warntype.speciesidx = 0;
+ context.warntype.speciesidx = NON_PM;
context.warntype.species = 0;
context.warntype.polyd = 0;
+ HWarn_of_mon &= ~FROMRACE;
- switch (monsndx(mptr)) {
+ switch (u.umonnum) {
case PM_PURPLE_WORM:
warnidx = PM_SHRIEKER;
break;
case PM_VAMPIRE_LORD:
context.warntype.polyd = M2_HUMAN | M2_ELF;
HWarn_of_mon |= FROMRACE;
- return TRUE;
+ return;
}
- if (warnidx) {
+ if (warnidx >= LOW_PM) {
context.warntype.speciesidx = warnidx;
context.warntype.species = &mons[warnidx];
HWarn_of_mon |= FROMRACE;
- return TRUE;
}
- context.warntype.speciesidx = 0;
- context.warntype.species = 0;
- HWarn_of_mon &= ~FROMRACE;
- return FALSE;
}
/*polyself.c*/
-/* NetHack 3.6 restore.c $NHDT-Date: 1450231174 2015/12/16 01:59:34 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.102 $ */
+/* NetHack 3.6 restore.c $NHDT-Date: 1451082255 2015/12/25 22:24:15 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.103 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
return FALSE;
}
mread(fd, (genericptr_t) &context, sizeof(struct context_info));
- if (context.warntype.speciesidx)
+ if (context.warntype.speciesidx >= LOW_PM)
context.warntype.species = &mons[context.warntype.speciesidx];
/* we want to be able to revert to command line/environment/config