Merge branch 'NetHack-3.6'
This commit is contained in:
37
src/read.c
37
src/read.c
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 read.c $NHDT-Date: 1559679496 2019/06/04 20:18:16 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.165 $ */
|
||||
/* NetHack 3.6 read.c $NHDT-Date: 1560085864 2019/06/09 13:11:04 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.171 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Robert Patrick Rankin, 2012. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -2456,7 +2456,7 @@ struct _create_particular_data *d;
|
||||
d->fem = -1; /* gender not specified */
|
||||
d->randmonst = FALSE;
|
||||
d->maketame = d->makepeaceful = d->makehostile = FALSE;
|
||||
d->sleeping = d->saddled = d->invisible = FALSE;
|
||||
d->sleeping = d->saddled = d->invisible = d->hidden = FALSE;
|
||||
|
||||
if ((tmpp = strstri(bufp, "saddled ")) != 0) {
|
||||
d->saddled = TRUE;
|
||||
@@ -2528,9 +2528,9 @@ create_particular_creation(d)
|
||||
struct _create_particular_data *d;
|
||||
{
|
||||
struct permonst *whichpm = NULL;
|
||||
int i, flashglyph, firstchoice = NON_PM;
|
||||
int i, mx, my, firstchoice = NON_PM;
|
||||
struct monst *mtmp;
|
||||
boolean madeany = FALSE, doflash = FALSE;
|
||||
boolean madeany = FALSE;
|
||||
|
||||
if (!d->randmonst) {
|
||||
firstchoice = d->which;
|
||||
@@ -2559,7 +2559,7 @@ struct _create_particular_data *d;
|
||||
/* otherwise try again */
|
||||
continue;
|
||||
}
|
||||
flashglyph = mon_to_glyph(mtmp, rn2_on_display_rng);
|
||||
mx = mtmp->mx, my = mtmp->my;
|
||||
/* 'is_FOO()' ought to be called 'always_FOO()' */
|
||||
if (d->fem != -1 && !is_male(mtmp->data) && !is_female(mtmp->data))
|
||||
mtmp->female = d->fem; /* ignored for is_neuter() */
|
||||
@@ -2576,25 +2576,32 @@ struct _create_particular_data *d;
|
||||
put_saddle_on_mon(otmp, mtmp);
|
||||
}
|
||||
if (d->invisible) {
|
||||
int mx = mtmp->mx, my = mtmp->my;
|
||||
|
||||
mon_set_minvis(mtmp);
|
||||
if (does_block(mx, my, &levl[mx][my]))
|
||||
block_point(mx, my);
|
||||
else
|
||||
unblock_point(mx, my);
|
||||
doflash = TRUE;
|
||||
}
|
||||
if (d->hidden && is_hider(mtmp->data)) {
|
||||
if (d->hidden
|
||||
&& ((is_hider(mtmp->data) && mtmp->data->mlet != S_MIMIC)
|
||||
|| (hides_under(mtmp->data) && OBJ_AT(mx, my))
|
||||
|| (mtmp->data->mlet == S_EEL && is_pool(mx, my))))
|
||||
mtmp->mundetected = 1;
|
||||
doflash = TRUE;
|
||||
}
|
||||
if (d->sleeping)
|
||||
mtmp->msleeping = 1;
|
||||
if (doflash) {
|
||||
if (wizard && cansee(mtmp->mx, mtmp->my))
|
||||
if (!canseemon(mtmp) && !sensemon(mtmp))
|
||||
flash_glyph_at(mtmp->mx, mtmp->my, flashglyph);
|
||||
/* iff asking for 'hidden', show locaton of every created monster
|
||||
that can't be seen--whether that's due to successfully hiding
|
||||
or vision issues (line-of-sight, invisibility, blindness) */
|
||||
if (d->hidden && !canspotmon(mtmp)) {
|
||||
int count = couldsee(mx, my) ? 8 : 4;
|
||||
char saveviz = viz_array[my][mx];
|
||||
|
||||
if (!flags.sparkle)
|
||||
count /= 2;
|
||||
viz_array[my][mx] |= (IN_SIGHT | COULD_SEE);
|
||||
flash_glyph_at(mx, my, mon_to_glyph(mtmp, newsym_rn2), count);
|
||||
viz_array[my][mx] = saveviz;
|
||||
newsym(mx, my);
|
||||
}
|
||||
madeany = TRUE;
|
||||
/* in case we got a doppelganger instead of what was asked
|
||||
|
||||
Reference in New Issue
Block a user