still more "<mon> appears in a cloud of smoke"

For Angels who appear in a flash of light, temporarily light the
spot where they arrive.  If not previously visible, it will go back
to dark and change the angel to the remembered, unseen monster glyph,
usually before the player even notices.

Add more monsters to msummon_environ() so that it has latent support
for various light, fire, and lava creatures from mondata.h even
though these extra ones, like previous vortices, don't get summoned
by msummon().
This commit is contained in:
PatR
2021-06-25 14:43:14 -07:00
parent 4aceb467ce
commit ddf9eb0688
2 changed files with 31 additions and 7 deletions

View File

@@ -59,6 +59,7 @@ msummon(struct monst *mon)
{
struct permonst *ptr;
int dtype = NON_PM, cnt = 0, result = 0, census;
boolean xlight;
aligntyp atyp;
struct monst *mtmp;
@@ -138,6 +139,7 @@ msummon(struct monst *mon)
/* some candidates can generate a group of monsters, so simple
count of non-null makemon() result is not sufficient */
census = monster_census(FALSE);
xlight = FALSE;
while (cnt > 0) {
mtmp = makemon(&mons[dtype], u.ux, u.uy, MM_EMIN);
@@ -151,9 +153,16 @@ msummon(struct monst *mon)
or peaceful but different alignment */
EMIN(mtmp)->renegade =
(atyp != u.ualign.type) ^ !mtmp->mpeaceful;
/* TODO: set templit at new monster's spot and in one spot
radius around it to match forthcoming "flash of light"
instead of ordinary "cloud of smoke" */
}
if (mtmp->data->mlet == S_ANGEL && !Blind) {
/* for any 'A', 'cloud of smoke' will be 'flash of light';
if more than one monster is being created, that message
might be skipped for this monster but show 'mtmp' anyway */
show_transient_light((struct obj *) 0, mtmp->mx, mtmp->my);
xlight = TRUE;
/* we don't do this for 'burst of flame' (fire elemental)
because those monsters become their own light source */
}
if (cnt == 1 && canseemon(mtmp)) {
@@ -167,6 +176,13 @@ msummon(struct monst *mon)
cnt--;
}
if (xlight) {
/* Note: if we forced --More-- here, the 'A's would be visible for
long enough to be seen, but like with clairvoyance, some players
would be annoyed at the disruption of having to acknowledge it */
transient_light_cleanup();
}
/* how many monsters exist now compared to before? */
if (result)
result = monster_census(FALSE) - census;