fix grammar when choking on gold
some messages which referred to "mirror" ought to have used "looking glass"
incubi react to mirrors
+alignment of Angels was handled inconsistently
Platform- and/or Interface-Specific Fixes
E char FDECL(temple_occupied, (char *));
E int FDECL(pri_move, (struct monst *));
E void FDECL(priestini, (d_level *,struct mkroom *,int,int,BOOLEAN_P));
+E aligntyp FDECL(mon_aligntyp, (struct monst *));
E char *FDECL(priestname, (struct monst *,char *));
E boolean FDECL(p_coaligned, (struct monst *));
E struct monst *FDECL(findpriest, (CHAR_P));
-/* SCCS Id: @(#)artifact.c 3.5 2005/09/20 */
+/* SCCS Id: @(#)artifact.c 3.5 2005/10/01 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
badclass = self_willed &&
oart->role != NON_PM && oart != &artilist[ART_EXCALIBUR];
badalign = (oart->spfx & SPFX_RESTR) && oart->alignment != A_NONE &&
- (oart->alignment != sgn(mon->data->maligntyp));
+ (oart->alignment != sgn(mon_aligntyp(mon)));
} else { /* an M3_WANTSxxx monster or a fake player */
/* special monsters trying to take the Amulet, invocation tools or
quest item can touch anything except for `spec_applies' artifacts */
-/* SCCS Id: @(#)pline.c 3.5 2005/06/22 */
+/* SCCS Id: @(#)pline.c 3.5 2005/10/01 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
#define NEED_VARARGS /* Uses ... */ /* comment line for pre-compiled headers */
#include "hack.h"
-#include "epri.h"
#ifdef WIZARD
#include "edog.h"
#endif
mstatusline(mtmp)
register struct monst *mtmp;
{
- aligntyp alignment;
+ aligntyp alignment = mon_aligntyp(mtmp);
char info[BUFSZ], monnambuf[BUFSZ];
- if (mtmp->ispriest || mtmp->data == &mons[PM_ALIGNED_PRIEST]
- || mtmp->data == &mons[PM_ANGEL])
- alignment = EPRI(mtmp)->shralign;
- else
- alignment = mtmp->data->maligntyp;
- alignment = (alignment > 0) ? A_LAWFUL :
- (alignment < 0) ? A_CHAOTIC :
- A_NEUTRAL;
-
info[0] = 0;
if (mtmp->mtame) { Strcat(info, ", tame");
#ifdef WIZARD
-/* SCCS Id: @(#)priest.c 3.5 2002/11/06 */
+/* SCCS Id: @(#)priest.c 3.5 2005/10/01 */
/* Copyright (c) Izchak Miller, Steve Linhart, 1989. */
/* NetHack may be freely redistributed. See license for details. */
}
}
+/* get a monster's alignment type without caller needing EPRI & EMIN */
+aligntyp
+mon_aligntyp(mon)
+struct monst *mon;
+{
+ aligntyp algn = mon->ispriest ? EPRI(mon)->shralign :
+ mon->isminion ? EMIN(mon)->min_align :
+ mon->data->maligntyp;
+
+ if (algn == A_NONE) return A_NONE; /* negative but differs from chaotic */
+ return (algn > 0) ? A_LAWFUL : (algn < 0) ? A_CHAOTIC : A_NEUTRAL;
+}
+
/*
* Specially aligned monsters are named specially.
* - aligned priests with ispriest and high priests have shrines