fix #K3860 - figurine of an Angel

If asked to create an Angel when MM_EMIN isn't specified, makemon()
will either create an ordinary monster of type Angel without any
emin extension or add emin and create a minion affiliated with the
god for randomly chosen alignment.  Figurines didn't specify emin
so could result in either type, but wishing for them offered no
opportunity to specify alignment for the second type.

Change figurine activation to force the first type:  an ordinary
monster of type Angel, not affiliated with any particular deity.
This commit is contained in:
PatR
2023-03-16 02:24:52 -07:00
parent 3a30e434d8
commit 3d24607494

View File

@@ -116,10 +116,24 @@ make_familiar(struct obj *otmp, coordxy x, coordxy y, boolean quietly)
: (cgend == CORPSTAT_MALE) ? MM_MALE : 0L);
mtmp = makemon(pm, x, y, mmflags);
if (otmp && !mtmp) { /* monster was genocided or square occupied */
if (!quietly)
pline_The("figurine writhes and then shatters into pieces!");
break;
if (otmp) { /* figurine */
if (!mtmp) {
/* monster has been genocided or target spot is occupied */
if (!quietly)
pline_The(
"figurine writhes and then shatters into pieces!");
break;
} else if (mtmp->isminion) {
/* Fixup for figurine of an Angel: makemon() is willing to
create a random Angel as either an ordinary monster or as
a minion of random allegiance. We don't want the latter
here in case it successfully becomes a pet. */
mtmp->isminion = 0;
free_emin(mtmp);
/* [This could and possibly should be redone as a new
MM_flag passed to makemon() to suppress making a minion
so that no post-creation fixup would be needed.] */
}
}
} while (!mtmp && --trycnt > 0);