weapon/alternate-weapon/quiver pointer that could cause panic or crash
wielded/worn figurine which auto-transformed had same stale pointer bug
format names of not yet id'd artifacts such that obj type shows for non-weapons
+make quest leader be unlikely to be affected by polymorph traps
Platform- and/or Interface-Specific Fixes
-/* SCCS Id: @(#)makemon.c 3.5 2007/01/19 */
+/* SCCS Id: @(#)makemon.c 3.5 2007/03/23 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
mtmp->m_id = context.ident++;
if (!mtmp->m_id) mtmp->m_id = context.ident++; /* ident overflowed */
set_mon_data(mtmp, ptr, 0);
- if (mtmp->data->msound == MS_LEADER &&
- quest_info(MS_LEADER) == mndx)
+ if (ptr->msound == MS_LEADER && quest_info(MS_LEADER) == mndx)
quest_status.leader_m_id = mtmp->m_id;
mtmp->mnum = mndx;
if (In_sokoban(&u.uz) && !mindless(ptr)) /* know about traps here */
mtmp->mtrapseen = (1L << (PIT - 1)) | (1L << (HOLE - 1));
- if (ptr->msound == MS_LEADER) /* leader knows about portal */
- mtmp->mtrapseen |= (1L << (MAGIC_PORTAL-1));
+ /* quest leader and nemesis both know about all trap types */
+ if (ptr->msound == MS_LEADER || ptr->msound == MS_NEMESIS)
+ mtmp->mtrapseen = ~0;
place_monster(mtmp, x, y);
mtmp->mcansee = mtmp->mcanmove = TRUE;
-/* SCCS Id: @(#)sounds.c 3.5 2005/08/29 */
+/* SCCS Id: @(#)sounds.c 3.5 2007/03/23 */
/* Copyright (c) 1989 Janet Walz, Mike Threepoint */
/* NetHack may be freely redistributed. See license for details. */
domonnoise(mtmp)
register struct monst *mtmp;
{
+ char verbuf[BUFSZ];
register const char *pline_msg = 0, /* Monnam(mtmp) will be prepended */
*verbl_msg = 0, /* verbalize() */
*verbl_msg_mcan = 0; /* verbalize() if cancelled */
struct permonst *ptr = mtmp->data;
- char verbuf[BUFSZ];
+ int msound = ptr->msound;
/* presumably nearness and sleep checks have already been made */
if (Deaf) return(0);
if (is_silent(ptr)) return(0);
- /* Make sure its your role's quest quardian; adjust if not */
- if (ptr->msound == MS_GUARDIAN && ptr != &mons[urole.guardnum]) {
- int mndx = monsndx(ptr);
- ptr = &mons[genus(mndx,1)];
- }
+ /* leader might be poly'd; if he can still speak, give leader speach */
+ if (mtmp->m_id == quest_status.leader_m_id && msound > MS_ANIMAL)
+ msound = MS_LEADER;
+ /* make sure its your role's quest quardian; adjust if not */
+ else if (msound == MS_GUARDIAN && ptr != &mons[urole.guardnum])
+ msound = mons[genus(monsndx(ptr), 1)].msound;
/* be sure to do this before talking; the monster might teleport away, in
* which case we want to check its pre-teleport position
if (!canspotmon(mtmp))
map_invisible(mtmp->mx, mtmp->my);
- switch (ptr->msound) {
+ switch (msound) {
case MS_ORACLE:
return doconsult(mtmp);
case MS_PRIEST: