Merge branch 'NetHack-3.6'

This commit is contained in:
nhmall
2019-06-09 08:43:40 -04:00
5 changed files with 47 additions and 4 deletions

View File

@@ -66,6 +66,7 @@ thrown or kicked light source (lit lamp, candle, oil) should emit light as it
unlike watching a monster trying to swap out a cursed weapon for some other
weapon and failing, watching it wield a cursed weapon didn't report
that weapon becoming welded to the monster's hand/claw/whatever
wizard-mode: wish for hidden monsters that pass is_hider test
Fixes to Post-3.6.2 Problems that Were Exposed Via git Repository
@@ -116,6 +117,7 @@ classify sources as released, beta, or work-in-progress via NH_DEVEL_STATUS
rather than just released vs beta via BETA
if you reach the edge of a level (relatively uncommon) and try to move off,
report that you can't go farther if the 'mention_walls' option is set
wizard-mode: display effect to show where an unseen wished-for monster landed
NetHack Community Patches (or Variation) Included

View File

@@ -361,6 +361,7 @@ E void FDECL(newsym, (int, int));
E void FDECL(newsym_force, (int, int));
E void FDECL(shieldeff, (XCHAR_P, XCHAR_P));
E void FDECL(tmp_at, (int, int));
E void FDECL(flash_glyph_at, (int, int, int));
E void FDECL(swallowed, (int));
E void FDECL(under_ground, (int));
E void FDECL(under_water, (int));

View File

@@ -1067,6 +1067,30 @@ int x, y;
} /* end case */
}
/*
* flash_glyph_at(x, y, glyph)
*
* Briefly flash between the passed glyph and the glyph that's
* meant to be at the location.
*/
void
flash_glyph_at(x, y, tg)
int x, y, tg;
{
int i, glyph[2];
glyph[0] = tg;
glyph[1] = (level.flags.hero_memory)
? levl[x][y].glyph
: back_to_glyph(x, y);
for (i = 0; i < 15; i++) {
show_glyph(x, y, glyph[i % 2]);
flush_screen(1);
delay_output();
}
newsym(x, y);
}
/*
* swallowed()
*

View File

@@ -1957,7 +1957,7 @@ struct monst *mtmp;
#ifdef CLIPPING
cliparound(mtmp->mx, mtmp->my);
#endif
show_glyph(mtmp->mx, mtmp->my, mon_to_glyph(mtmp, rn2));
show_glyph(mtmp->mx, mtmp->my, mon_to_glyph(mtmp, rn2_on_display_rng));
display_self();
You_feel("aggravated at %s.", noit_mon_nam(mtmp));
display_nhwindow(WIN_MAP, TRUE);

View File

@@ -2440,7 +2440,7 @@ struct _create_particular_data {
char monclass;
boolean randmonst;
boolean maketame, makepeaceful, makehostile;
boolean sleeping, saddled, invisible;
boolean sleeping, saddled, invisible, hidden;
};
boolean
@@ -2470,6 +2470,10 @@ struct _create_particular_data *d;
d->invisible = TRUE;
(void) memset(tmpp, ' ', sizeof "invisible " - 1);
}
if ((tmpp = strstri(bufp, "hidden ")) != 0) {
d->hidden = TRUE;
(void) memset(tmpp, ' ', sizeof "hidden " - 1);
}
/* check "female" before "male" to avoid false hit mid-word */
if ((tmpp = strstri(bufp, "female ")) != 0) {
d->fem = 1;
@@ -2524,9 +2528,9 @@ create_particular_creation(d)
struct _create_particular_data *d;
{
struct permonst *whichpm = NULL;
int i, firstchoice = NON_PM;
int i, flashglyph, firstchoice = NON_PM;
struct monst *mtmp;
boolean madeany = FALSE;
boolean madeany = FALSE, doflash = FALSE;
if (!d->randmonst) {
firstchoice = d->which;
@@ -2555,6 +2559,7 @@ struct _create_particular_data *d;
/* otherwise try again */
continue;
}
flashglyph = mon_to_glyph(mtmp, rn2_on_display_rng);
/* '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() */
@@ -2572,14 +2577,25 @@ struct _create_particular_data *d;
}
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)) {
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);
}
madeany = TRUE;
/* in case we got a doppelganger instead of what was asked
for, make it start out looking like what was asked for */