minions/Angels (trunk only)
Angels used the epri extension even though they're never priests,
presumeably because they're sometimes flagged as "renegade". Since the
only priests ever flagged as renegade are roaming minions rather than
temple priests, move the renegade flag to the emin extension and switch
Angels over to that. Summoned Angels will now always have the isminion
flag set.
Makefiles need updating: monst.{c,o} now depends upon emin.h.
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
/* SCCS Id: @(#)emin.h 3.5 1997/05/01 */
|
/* SCCS Id: @(#)emin.h 3.5 2005/11/02 */
|
||||||
/* Copyright (c) David Cohrs, 1990. */
|
/* Copyright (c) David Cohrs, 1990. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
@@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
struct emin {
|
struct emin {
|
||||||
aligntyp min_align; /* alignment of minion */
|
aligntyp min_align; /* alignment of minion */
|
||||||
|
boolean renegade; /* hostile co-aligned priest or Angel */
|
||||||
};
|
};
|
||||||
|
|
||||||
#define EMIN(mon) ((struct emin *)&(mon)->mextra[0])
|
#define EMIN(mon) ((struct emin *)&(mon)->mextra[0])
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* SCCS Id: @(#)epri.h 3.5 1997/05/01 */
|
/* SCCS Id: @(#)epri.h 3.5 2005/11/02 */
|
||||||
/* Copyright (c) Izchak Miller, 1989. */
|
/* Copyright (c) Izchak Miller, 1989. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
@@ -15,10 +15,7 @@ struct epri {
|
|||||||
|
|
||||||
#define EPRI(mon) ((struct epri *)&(mon)->mextra[0])
|
#define EPRI(mon) ((struct epri *)&(mon)->mextra[0])
|
||||||
|
|
||||||
/* A priest without ispriest is a roaming priest without a shrine, so
|
/* note: roaming priests (no shrine) switch from ispriest to isminion
|
||||||
* the fields (except shralign, which becomes only the priest alignment)
|
(and emin extension) */
|
||||||
* are available for reuse.
|
|
||||||
*/
|
|
||||||
#define renegade shroom
|
|
||||||
|
|
||||||
#endif /* EPRI_H */
|
#endif /* EPRI_H */
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* SCCS Id: @(#)patchlevel.h 3.5 2005/09/12 */
|
/* SCCS Id: @(#)patchlevel.h 3.5 2005/11/02 */
|
||||||
/* 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. */
|
||||||
|
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
* Incrementing EDITLEVEL can be used to force invalidation of old bones
|
* Incrementing EDITLEVEL can be used to force invalidation of old bones
|
||||||
* and save files.
|
* and save files.
|
||||||
*/
|
*/
|
||||||
#define EDITLEVEL 23
|
#define EDITLEVEL 24
|
||||||
|
|
||||||
#define COPYRIGHT_BANNER_A \
|
#define COPYRIGHT_BANNER_A \
|
||||||
"NetHack, Copyright 1985-2005"
|
"NetHack, Copyright 1985-2005"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* SCCS Id: @(#)makemon.c 3.5 2005/09/20 */
|
/* SCCS Id: @(#)makemon.c 3.5 2005/11/02 */
|
||||||
/* 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. */
|
||||||
|
|
||||||
@@ -1098,6 +1098,18 @@ register int mmflags;
|
|||||||
initworm(mtmp, rn2(5));
|
initworm(mtmp, rn2(5));
|
||||||
if (count_wsegs(mtmp)) place_worm_tail_randomly(mtmp, x, y);
|
if (count_wsegs(mtmp)) place_worm_tail_randomly(mtmp, x, y);
|
||||||
}
|
}
|
||||||
|
/* it's possible to create an ordinary monster of some special
|
||||||
|
types; make sure their extended data is initialized to
|
||||||
|
something sensible (caller can override these settings) */
|
||||||
|
if (mndx == PM_ALIGNED_PRIEST || (mndx == PM_ANGEL && !rn2(3))) {
|
||||||
|
struct emin *eminp = EMIN(mtmp);
|
||||||
|
|
||||||
|
mtmp->isminion = 1; /* make priest be a roamer */
|
||||||
|
eminp->min_align = rn2(3) - 1; /* no A_NONE */
|
||||||
|
eminp->renegade = (mmflags & MM_ANGRY) ? 1 : !rn2(3);
|
||||||
|
mtmp->mpeaceful = (eminp->min_align == u.ualign.type) ?
|
||||||
|
!eminp->renegade : eminp->renegade;
|
||||||
|
}
|
||||||
set_malign(mtmp); /* having finished peaceful changes */
|
set_malign(mtmp); /* having finished peaceful changes */
|
||||||
if(anymon) {
|
if(anymon) {
|
||||||
if ((ptr->geno & G_SGROUP) && rn2(2)) {
|
if ((ptr->geno & G_SGROUP) && rn2(2)) {
|
||||||
|
|||||||
38
src/minion.c
38
src/minion.c
@@ -17,10 +17,9 @@ struct monst *mon;
|
|||||||
|
|
||||||
if (mon) {
|
if (mon) {
|
||||||
ptr = mon->data;
|
ptr = mon->data;
|
||||||
atyp = (ptr->maligntyp==A_NONE) ? A_NONE : sgn(ptr->maligntyp);
|
atyp = mon->ispriest ? EPRI(mon)->shralign :
|
||||||
if (mon->ispriest || mon->data == &mons[PM_ALIGNED_PRIEST]
|
mon->isminion ? EMIN(mon)->min_align :
|
||||||
|| mon->data == &mons[PM_ANGEL])
|
(ptr->maligntyp == A_NONE) ? A_NONE : sgn(ptr->maligntyp);
|
||||||
atyp = EPRI(mon)->shralign;
|
|
||||||
} else {
|
} else {
|
||||||
ptr = &mons[PM_WIZARD_OF_YENDOR];
|
ptr = &mons[PM_WIZARD_OF_YENDOR];
|
||||||
atyp = (ptr->maligntyp==A_NONE) ? A_NONE : sgn(ptr->maligntyp);
|
atyp = (ptr->maligntyp==A_NONE) ? A_NONE : sgn(ptr->maligntyp);
|
||||||
@@ -78,7 +77,14 @@ struct monst *mon;
|
|||||||
if (mtmp) {
|
if (mtmp) {
|
||||||
result++;
|
result++;
|
||||||
/* an angel's alignment should match the summoner */
|
/* an angel's alignment should match the summoner */
|
||||||
if (dtype == PM_ANGEL) EPRI(mtmp)->shralign = atyp;
|
if (dtype == PM_ANGEL) {
|
||||||
|
mtmp->isminion = 1;
|
||||||
|
EMIN(mtmp)->min_align = atyp;
|
||||||
|
/* renegade if same alignment but not peaceful
|
||||||
|
or peaceful but different alignment */
|
||||||
|
EMIN(mtmp)->renegade =
|
||||||
|
(atyp != u.ualign.type) ^ !mtmp->mpeaceful;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
cnt--;
|
cnt--;
|
||||||
}
|
}
|
||||||
@@ -111,21 +117,17 @@ boolean talk;
|
|||||||
}
|
}
|
||||||
if (mnum == NON_PM) {
|
if (mnum == NON_PM) {
|
||||||
mon = 0;
|
mon = 0;
|
||||||
} else if (mons[mnum].pxlth == 0) {
|
} else if (mons[mnum].pxlth == 0 || mnum == PM_ANGEL) {
|
||||||
struct permonst *pm = &mons[mnum];
|
mon = makemon(&mons[mnum], u.ux, u.uy,
|
||||||
mon = makemon(pm, u.ux, u.uy, MM_EMIN);
|
(mnum == PM_ANGEL) ? NO_MM_FLAGS : MM_EMIN);
|
||||||
if (mon) {
|
if (mon) {
|
||||||
mon->isminion = TRUE;
|
mon->isminion = 1;
|
||||||
EMIN(mon)->min_align = alignment;
|
EMIN(mon)->min_align = alignment;
|
||||||
|
EMIN(mon)->renegade = FALSE;
|
||||||
}
|
}
|
||||||
} else if (mnum == PM_ANGEL) {
|
} else {
|
||||||
mon = makemon(&mons[mnum], u.ux, u.uy, NO_MM_FLAGS);
|
|
||||||
if (mon) {
|
|
||||||
mon->isminion = TRUE;
|
|
||||||
EPRI(mon)->shralign = alignment; /* always A_LAWFUL here */
|
|
||||||
}
|
|
||||||
} else
|
|
||||||
mon = makemon(&mons[mnum], u.ux, u.uy, NO_MM_FLAGS);
|
mon = makemon(&mons[mnum], u.ux, u.uy, NO_MM_FLAGS);
|
||||||
|
}
|
||||||
if (mon) {
|
if (mon) {
|
||||||
if (talk) {
|
if (talk) {
|
||||||
pline_The("voice of %s booms:", align_gname(alignment));
|
pline_The("voice of %s booms:", align_gname(alignment));
|
||||||
@@ -340,8 +342,8 @@ struct monst *mon; /* if null, angel hasn't been created yet */
|
|||||||
}
|
}
|
||||||
mongone(mon);
|
mongone(mon);
|
||||||
}
|
}
|
||||||
/* create 1 to 4 hostile angels to replace the lost guardian */
|
/* create 2 to 4 hostile angels to replace the lost guardian */
|
||||||
for (i = rnd(4); i > 0; --i) {
|
for (i = rn1(3,2); i > 0; --i) {
|
||||||
mm.x = u.ux;
|
mm.x = u.ux;
|
||||||
mm.y = u.uy;
|
mm.y = u.uy;
|
||||||
if (enexto(&mm, mm.x, mm.y, &mons[PM_ANGEL]))
|
if (enexto(&mm, mm.x, mm.y, &mons[PM_ANGEL]))
|
||||||
|
|||||||
13
src/monst.c
13
src/monst.c
@@ -1,4 +1,4 @@
|
|||||||
/* SCCS Id: @(#)monst.c 3.5 2000/07/14 */
|
/* SCCS Id: @(#)monst.c 3.5 2005/11/02 */
|
||||||
/* 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. */
|
||||||
|
|
||||||
@@ -9,6 +9,7 @@
|
|||||||
#include "eshk.h"
|
#include "eshk.h"
|
||||||
#include "vault.h"
|
#include "vault.h"
|
||||||
#include "epri.h"
|
#include "epri.h"
|
||||||
|
#include "emin.h"
|
||||||
|
|
||||||
#define NO_ATTK {0,0,0,0}
|
#define NO_ATTK {0,0,0,0}
|
||||||
|
|
||||||
@@ -1085,12 +1086,16 @@ NEARDATA struct permonst mons[] = {
|
|||||||
M1_HUMANOID|M1_SEE_INVIS,
|
M1_HUMANOID|M1_SEE_INVIS,
|
||||||
M2_MINION|M2_STALK|M2_NASTY|M2_COLLECT, M3_INFRAVISIBLE|M3_INFRAVISION,
|
M2_MINION|M2_STALK|M2_NASTY|M2_COLLECT, M3_INFRAVISIBLE|M3_INFRAVISION,
|
||||||
CLR_YELLOW),
|
CLR_YELLOW),
|
||||||
|
/* Angels start with the emin extension attached, and usually have
|
||||||
|
the isminion flag set; however, non-minion Angels can be tamed
|
||||||
|
and will switch to edog (guardian Angel is handled specially and
|
||||||
|
always sticks with emin) */
|
||||||
MON("Angel", S_ANGEL,
|
MON("Angel", S_ANGEL,
|
||||||
LVL(14, 10, -4, 55, 12), (G_NOHELL|G_NOCORPSE|1),
|
LVL(14, 10, -4, 55, 12), (G_NOHELL|G_NOCORPSE|1),
|
||||||
A(ATTK(AT_WEAP, AD_PHYS, 1, 6), ATTK(AT_WEAP, AD_PHYS, 1, 6),
|
A(ATTK(AT_WEAP, AD_PHYS, 1, 6), ATTK(AT_WEAP, AD_PHYS, 1, 6),
|
||||||
ATTK(AT_CLAW, AD_PHYS, 1, 4), ATTK(AT_MAGC, AD_MAGM, 2, 6),
|
ATTK(AT_CLAW, AD_PHYS, 1, 4), ATTK(AT_MAGC, AD_MAGM, 2, 6),
|
||||||
NO_ATTK, NO_ATTK),
|
NO_ATTK, NO_ATTK),
|
||||||
SIZ(WT_HUMAN, 400, sizeof(struct epri), MS_CUSS, MZ_HUMAN),
|
SIZ(WT_HUMAN, 400, sizeof(struct emin), MS_CUSS, MZ_HUMAN),
|
||||||
MR_COLD|MR_ELEC|MR_SLEEP|MR_POISON, 0,
|
MR_COLD|MR_ELEC|MR_SLEEP|MR_POISON, 0,
|
||||||
M1_FLY|M1_HUMANOID|M1_SEE_INVIS,
|
M1_FLY|M1_HUMANOID|M1_SEE_INVIS,
|
||||||
M2_NOPOLY|M2_MINION|M2_STALK|M2_STRONG|M2_NASTY|M2_COLLECT,
|
M2_NOPOLY|M2_MINION|M2_STALK|M2_STRONG|M2_NASTY|M2_COLLECT,
|
||||||
@@ -2391,6 +2396,9 @@ struct permonst _mons2[] = {
|
|||||||
SIZ(WT_HUMAN, 400, 0, MS_ORACLE, MZ_HUMAN), 0, 0,
|
SIZ(WT_HUMAN, 400, 0, MS_ORACLE, MZ_HUMAN), 0, 0,
|
||||||
M1_HUMANOID|M1_OMNIVORE,
|
M1_HUMANOID|M1_OMNIVORE,
|
||||||
M2_NOPOLY|M2_HUMAN|M2_PEACEFUL|M2_FEMALE, M3_INFRAVISIBLE, HI_ZAP),
|
M2_NOPOLY|M2_HUMAN|M2_PEACEFUL|M2_FEMALE, M3_INFRAVISIBLE, HI_ZAP),
|
||||||
|
/* aligned priests always have the epri extension attached;
|
||||||
|
individual instantiations should always have either ispriest
|
||||||
|
or isminion set */
|
||||||
MON("aligned priest", S_HUMAN,
|
MON("aligned priest", S_HUMAN,
|
||||||
LVL(12, 12, 10, 50, 0), G_NOGEN,
|
LVL(12, 12, 10, 50, 0), G_NOGEN,
|
||||||
A(ATTK(AT_WEAP, AD_PHYS, 4,10), ATTK(AT_KICK, AD_PHYS, 1, 4),
|
A(ATTK(AT_WEAP, AD_PHYS, 4,10), ATTK(AT_KICK, AD_PHYS, 1, 4),
|
||||||
@@ -2399,6 +2407,7 @@ struct permonst _mons2[] = {
|
|||||||
MR_ELEC, 0, M1_HUMANOID|M1_OMNIVORE,
|
MR_ELEC, 0, M1_HUMANOID|M1_OMNIVORE,
|
||||||
M2_NOPOLY|M2_HUMAN|M2_LORD|M2_PEACEFUL|M2_COLLECT, M3_INFRAVISIBLE,
|
M2_NOPOLY|M2_HUMAN|M2_LORD|M2_PEACEFUL|M2_COLLECT, M3_INFRAVISIBLE,
|
||||||
CLR_WHITE),
|
CLR_WHITE),
|
||||||
|
/* high priests always have epri and always have ispriest set */
|
||||||
MON("high priest", S_HUMAN,
|
MON("high priest", S_HUMAN,
|
||||||
LVL(25, 15, 7, 70, 0), (G_NOGEN|G_UNIQ),
|
LVL(25, 15, 7, 70, 0), (G_NOGEN|G_UNIQ),
|
||||||
A(ATTK(AT_WEAP, AD_PHYS, 4,10), ATTK(AT_KICK, AD_PHYS, 2, 8),
|
A(ATTK(AT_WEAP, AD_PHYS, 4,10), ATTK(AT_KICK, AD_PHYS, 2, 8),
|
||||||
|
|||||||
110
src/priest.c
110
src/priest.c
@@ -1,4 +1,4 @@
|
|||||||
/* SCCS Id: @(#)priest.c 3.5 2005/10/01 */
|
/* SCCS Id: @(#)priest.c 3.5 2005/11/02 */
|
||||||
/* Copyright (c) Izchak Miller, Steve Linhart, 1989. */
|
/* Copyright (c) Izchak Miller, Steve Linhart, 1989. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
@@ -199,6 +199,7 @@ boolean sanctum; /* is it the seat of the high priest? */
|
|||||||
priest->mtrapseen = ~0; /* traps are known */
|
priest->mtrapseen = ~0; /* traps are known */
|
||||||
priest->mpeaceful = 1;
|
priest->mpeaceful = 1;
|
||||||
priest->ispriest = 1;
|
priest->ispriest = 1;
|
||||||
|
priest->isminion = 0;
|
||||||
priest->msleeping = 0;
|
priest->msleeping = 0;
|
||||||
set_malign(priest); /* mpeaceful may have changed */
|
set_malign(priest); /* mpeaceful may have changed */
|
||||||
|
|
||||||
@@ -238,10 +239,8 @@ struct monst *mon;
|
|||||||
* Specially aligned monsters are named specially.
|
* Specially aligned monsters are named specially.
|
||||||
* - aligned priests with ispriest and high priests have shrines
|
* - aligned priests with ispriest and high priests have shrines
|
||||||
* they retain ispriest and epri when polymorphed
|
* they retain ispriest and epri when polymorphed
|
||||||
* - aligned priests without ispriest and Angels are roamers
|
* - aligned priests without ispriest are roamers
|
||||||
* they retain isminion and access epri as emin when polymorphed
|
* they have isminion set and access epri as emin
|
||||||
* (coaligned Angels are also created as minions, but they
|
|
||||||
* use the same naming convention)
|
|
||||||
* - minions do not have ispriest but have isminion and emin
|
* - minions do not have ispriest but have isminion and emin
|
||||||
* - caller needs to inhibit Hallucination if it wants to force
|
* - caller needs to inhibit Hallucination if it wants to force
|
||||||
* the true name even when under that influence
|
* the true name even when under that influence
|
||||||
@@ -251,41 +250,40 @@ priestname(mon, pname)
|
|||||||
register struct monst *mon;
|
register struct monst *mon;
|
||||||
char *pname; /* caller-supplied output buffer */
|
char *pname; /* caller-supplied output buffer */
|
||||||
{
|
{
|
||||||
const char *what = Hallucination ? rndmonnam() : mon->data->mname;
|
boolean aligned_priest = mon->data == &mons[PM_ALIGNED_PRIEST],
|
||||||
|
high_priest = mon->data == &mons[PM_HIGH_PRIEST];
|
||||||
|
const char *what = Hallucination ? rndmonnam() : mon->data->mname;
|
||||||
|
|
||||||
Strcpy(pname, "the ");
|
if (!mon->ispriest && !mon->isminion) /* should never happen... */
|
||||||
if (mon->minvis) Strcat(pname, "invisible ");
|
return strcpy(pname, what); /* caller must be confused */
|
||||||
if (mon->ispriest || mon->data == &mons[PM_ALIGNED_PRIEST] ||
|
|
||||||
mon->data == &mons[PM_ANGEL]) {
|
Strcpy(pname, "the ");
|
||||||
/* use epri */
|
if (mon->minvis) Strcat(pname, "invisible ");
|
||||||
if (mon->mtame && mon->data == &mons[PM_ANGEL])
|
if (mon->isminion && EMIN(mon)->renegade)
|
||||||
Strcat(pname, "guardian ");
|
Strcat(pname, "renegade ");
|
||||||
if (mon->data != &mons[PM_ALIGNED_PRIEST] &&
|
|
||||||
mon->data != &mons[PM_HIGH_PRIEST]) {
|
if (mon->ispriest || aligned_priest) { /* high_priest implies ispriest */
|
||||||
Strcat(pname, what);
|
if (!aligned_priest && !high_priest) {
|
||||||
Strcat(pname, " ");
|
; /* polymorphed priest; use ``what'' as is */
|
||||||
}
|
} else {
|
||||||
if (mon->data != &mons[PM_ANGEL]) {
|
if (high_priest)
|
||||||
if (!mon->ispriest && EPRI(mon)->renegade)
|
Strcat(pname, "high ");
|
||||||
Strcat(pname, "renegade ");
|
if (Hallucination)
|
||||||
if (mon->data == &mons[PM_HIGH_PRIEST])
|
what = "poohbah";
|
||||||
Strcat(pname, "high ");
|
else if (mon->female)
|
||||||
if (Hallucination)
|
what = "priestess";
|
||||||
Strcat(pname, "poohbah ");
|
else
|
||||||
else if (mon->female)
|
what = "priest";
|
||||||
Strcat(pname, "priestess ");
|
|
||||||
else
|
|
||||||
Strcat(pname, "priest ");
|
|
||||||
}
|
|
||||||
Strcat(pname, "of ");
|
|
||||||
Strcat(pname, halu_gname((int)EPRI(mon)->shralign));
|
|
||||||
return(pname);
|
|
||||||
}
|
}
|
||||||
/* use emin instead of epri */
|
} else {
|
||||||
Strcat(pname, what);
|
if (mon->mtame)
|
||||||
Strcat(pname, " of ");
|
Strcat(pname, "guardian ");
|
||||||
Strcat(pname, halu_gname(EMIN(mon)->min_align));
|
}
|
||||||
return(pname);
|
|
||||||
|
Strcat(pname, what);
|
||||||
|
Strcat(pname, " of ");
|
||||||
|
Strcat(pname, halu_gname(mon_aligntyp(mon)));
|
||||||
|
return pname;
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean
|
boolean
|
||||||
@@ -544,19 +542,20 @@ boolean peaceful;
|
|||||||
register struct monst *roamer;
|
register struct monst *roamer;
|
||||||
register boolean coaligned = (u.ualign.type == alignment);
|
register boolean coaligned = (u.ualign.type == alignment);
|
||||||
|
|
||||||
|
/* Angel's have the emin extension; aligned priests have the epri
|
||||||
|
extension, we access it as if it were emin */
|
||||||
if (ptr != &mons[PM_ALIGNED_PRIEST] && ptr != &mons[PM_ANGEL])
|
if (ptr != &mons[PM_ALIGNED_PRIEST] && ptr != &mons[PM_ANGEL])
|
||||||
return((struct monst *)0);
|
return((struct monst *)0);
|
||||||
|
|
||||||
if (MON_AT(x, y)) (void) rloc(m_at(x, y), FALSE); /* insurance */
|
if (MON_AT(x, y)) (void) rloc(m_at(x, y), FALSE); /* insurance */
|
||||||
|
|
||||||
if (!(roamer = makemon(ptr, x, y, NO_MM_FLAGS)))
|
if (!(roamer = makemon(ptr, x, y, MM_ADJACENTOK)))
|
||||||
return((struct monst *)0);
|
return((struct monst *)0);
|
||||||
|
|
||||||
EPRI(roamer)->shralign = alignment;
|
EMIN(roamer)->min_align = alignment;
|
||||||
if (coaligned && !peaceful)
|
EMIN(roamer)->renegade = (coaligned && !peaceful);
|
||||||
EPRI(roamer)->renegade = TRUE;
|
roamer->ispriest = 0;
|
||||||
/* roamer->ispriest == FALSE naturally */
|
roamer->isminion = 1;
|
||||||
roamer->isminion = TRUE; /* borrowing this bit */
|
|
||||||
roamer->mtrapseen = ~0; /* traps are known */
|
roamer->mtrapseen = ~0; /* traps are known */
|
||||||
roamer->mpeaceful = peaceful;
|
roamer->mpeaceful = peaceful;
|
||||||
roamer->msleeping = 0;
|
roamer->msleeping = 0;
|
||||||
@@ -570,11 +569,11 @@ void
|
|||||||
reset_hostility(roamer)
|
reset_hostility(roamer)
|
||||||
register struct monst *roamer;
|
register struct monst *roamer;
|
||||||
{
|
{
|
||||||
if(!(roamer->isminion && (roamer->data == &mons[PM_ALIGNED_PRIEST] ||
|
if (!roamer->isminion) return;
|
||||||
roamer->data == &mons[PM_ANGEL])))
|
if (roamer->data != &mons[PM_ALIGNED_PRIEST] &&
|
||||||
return;
|
roamer->data != &mons[PM_ANGEL]) return;
|
||||||
|
|
||||||
if(EPRI(roamer)->shralign != u.ualign.type) {
|
if (EMIN(roamer)->min_align != u.ualign.type) {
|
||||||
roamer->mpeaceful = roamer->mtame = 0;
|
roamer->mpeaceful = roamer->mtame = 0;
|
||||||
set_malign(roamer);
|
set_malign(roamer);
|
||||||
}
|
}
|
||||||
@@ -686,24 +685,25 @@ angry_priest()
|
|||||||
EPRI(priest)->shralign)) {
|
EPRI(priest)->shralign)) {
|
||||||
priest->ispriest = 0; /* now a roamer */
|
priest->ispriest = 0; /* now a roamer */
|
||||||
priest->isminion = 1; /* but still aligned */
|
priest->isminion = 1; /* but still aligned */
|
||||||
/* this overloads the `shroom' field, which is now clobbered */
|
/* this overloads EPRI's shroom field, which is now clobbered */
|
||||||
EPRI(priest)->renegade = 0;
|
EMIN(priest)->renegade = FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* When saving bones, find priests that aren't on their shrine level,
|
* When saving bones, find priests that aren't on their shrine level,
|
||||||
* and remove them. This avoids big problems when restoring bones.
|
* and remove them. This avoids big problems when restoring bones.
|
||||||
|
* [Perhaps we should convert them into roamers instead?]
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
clearpriests()
|
clearpriests()
|
||||||
{
|
{
|
||||||
register struct monst *mtmp, *mtmp2;
|
struct monst *mtmp;
|
||||||
|
|
||||||
for(mtmp = fmon; mtmp; mtmp = mtmp2) {
|
for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
|
||||||
mtmp2 = mtmp->nmon;
|
if (DEADMONSTER(mtmp)) continue;
|
||||||
if (!DEADMONSTER(mtmp) && mtmp->ispriest && !on_level(&(EPRI(mtmp)->shrlevel), &u.uz))
|
if (mtmp->ispriest && !on_level(&(EPRI(mtmp)->shrlevel), &u.uz))
|
||||||
mongone(mtmp);
|
mongone(mtmp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user