add MM_NOGRP makemon() flag
add MM_NOGRP makemon() flag as a means of suppressing groups of monsters in a couple places that warrant it when a specific monster type isn't specified on the call to makemon()
This commit is contained in:
@@ -129,10 +129,8 @@ int x, y, n, mmflags;
|
||||
* smaller group.
|
||||
*/
|
||||
if (enexto(&mm, mm.x, mm.y, mtmp->data)) {
|
||||
mon = makemon(mtmp->data, mm.x, mm.y, NO_MM_FLAGS);
|
||||
mon = makemon(mtmp->data, mm.x, mm.y, (mmflags | MM_NOGRP));
|
||||
if (mon) {
|
||||
if (mmflags & MM_ASLEEP)
|
||||
mon->msleeping = 1;
|
||||
mon->mpeaceful = FALSE;
|
||||
mon->mavenge = 0;
|
||||
set_malign(mon);
|
||||
@@ -1367,7 +1365,7 @@ int mmflags;
|
||||
: eminp->renegade;
|
||||
}
|
||||
set_malign(mtmp); /* having finished peaceful changes */
|
||||
if (anymon) {
|
||||
if (anymon && !(mmflags & MM_NOGRP)) {
|
||||
if ((ptr->geno & G_SGROUP) && rn2(2)) {
|
||||
m_initsgrp(mtmp, mtmp->mx, mtmp->my, mmflags);
|
||||
} else if (ptr->geno & G_LGROUP) {
|
||||
|
||||
@@ -803,7 +803,7 @@ skip0:
|
||||
if (u.uhave.amulet || !rn2(3)) {
|
||||
x = somex(croom);
|
||||
y = somey(croom);
|
||||
tmonst = makemon((struct permonst *) 0, x, y, NO_MM_FLAGS);
|
||||
tmonst = makemon((struct permonst *) 0, x, y, (MM_NOGRP | MM_ASLEEP));
|
||||
if (tmonst && tmonst->data == &mons[PM_GIANT_SPIDER]
|
||||
&& !occupied(x, y))
|
||||
(void) maketrap(x, y, WEB);
|
||||
|
||||
Reference in New Issue
Block a user