stinking cloud vs drawbridge
While looking at something else, I noticed that newsym() was checking for pool and lava by examining the terrain type directly rather than using the pool and lava checks, so it would never show a gas cloud at a closed drawbridge (the spot in front of the portcullis). Level's terrain at a closed drawbridge spot is DRAWBRIDGE_UP; need to look at drawbridgemask field to figure out whether the accessible terrain at that spot is moat or lava.
This commit is contained in:
@@ -171,6 +171,7 @@ overview information for former hero was not being set properly when bones
|
|||||||
in Guidebook.mn and Guidebook.txt, the 'I' command mis-described `IX' as
|
in Guidebook.mn and Guidebook.txt, the 'I' command mis-described `IX' as
|
||||||
displaying inventory items whose bless/curse state is "known"
|
displaying inventory items whose bless/curse state is "known"
|
||||||
(Guidebook.tex correctly had "unknown")
|
(Guidebook.tex correctly had "unknown")
|
||||||
|
poison gas (stinking cloud) wasn't shown at drawbridge-up spot
|
||||||
|
|
||||||
|
|
||||||
Fixes to Post-3.6.1 Problems that Were Exposed Via git Repository
|
Fixes to Post-3.6.1 Problems that Were Exposed Via git Repository
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 display.c $NHDT-Date: 1525056598 2018/04/30 02:49:58 $ $NHDT-Branch: master $:$NHDT-Revision: 1.92 $ */
|
/* NetHack 3.6 display.c $NHDT-Date: 1540502147 2018/10/25 21:15:47 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.94 $ */
|
||||||
/* Copyright (c) Dean Luick, with acknowledgements to Kevin Darcy */
|
/* Copyright (c) Dean Luick, with acknowledgements to Kevin Darcy */
|
||||||
/* and Dave Cohrs, 1990. */
|
/* and Dave Cohrs, 1990. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
@@ -512,6 +512,7 @@ warning_of(mon)
|
|||||||
struct monst *mon;
|
struct monst *mon;
|
||||||
{
|
{
|
||||||
int wl = 0, tmp = 0;
|
int wl = 0, tmp = 0;
|
||||||
|
|
||||||
if (mon_warning(mon)) {
|
if (mon_warning(mon)) {
|
||||||
tmp = (int) (mon->m_lev / 4); /* match display.h */
|
tmp = (int) (mon->m_lev / 4); /* match display.h */
|
||||||
wl = (tmp > WARNCOUNT - 1) ? WARNCOUNT - 1 : tmp;
|
wl = (tmp > WARNCOUNT - 1) ? WARNCOUNT - 1 : tmp;
|
||||||
@@ -755,38 +756,36 @@ register int x, y;
|
|||||||
/* normal region shown only on accessible positions, but poison clouds
|
/* normal region shown only on accessible positions, but poison clouds
|
||||||
* also shown above lava, pools and moats.
|
* also shown above lava, pools and moats.
|
||||||
*/
|
*/
|
||||||
if (reg != NULL && (ACCESSIBLE(lev->typ)
|
if (reg && (ACCESSIBLE(lev->typ)
|
||||||
|| (reg->glyph == cmap_to_glyph(S_poisoncloud)
|
|| (reg->glyph == cmap_to_glyph(S_poisoncloud)
|
||||||
&& (lev->typ == LAVAPOOL || lev->typ == POOL
|
&& is_pool_or_lava(x, y)))) {
|
||||||
|| lev->typ == MOAT)))) {
|
|
||||||
show_region(reg, x, y);
|
show_region(reg, x, y);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (x == u.ux && y == u.uy) {
|
if (x == u.ux && y == u.uy) {
|
||||||
if (canspotself()) {
|
int see_self = canspotself();
|
||||||
_map_location(x, y, 0); /* map *under* self */
|
|
||||||
|
/* update map information for <u.ux,u.uy> (remembered topology
|
||||||
|
and object/known trap/terrain glyph) but only display it if
|
||||||
|
hero can't see him/herself, then show self if appropriate */
|
||||||
|
_map_location(x, y, !see_self);
|
||||||
|
if (see_self)
|
||||||
display_self();
|
display_self();
|
||||||
} else
|
|
||||||
/* we can see what is there */
|
|
||||||
_map_location(x, y, 1);
|
|
||||||
} else {
|
} else {
|
||||||
mon = m_at(x, y);
|
mon = m_at(x, y);
|
||||||
worm_tail = is_worm_tail(mon);
|
worm_tail = is_worm_tail(mon);
|
||||||
see_it =
|
see_it = mon && (mon_visible(mon)
|
||||||
mon && (worm_tail ? (!mon->minvis || See_invisible)
|
|| (!worm_tail && (tp_sensemon(mon)
|
||||||
: (mon_visible(mon)) || tp_sensemon(mon)
|
|| MATCH_WARN_OF_MON(mon))));
|
||||||
|| MATCH_WARN_OF_MON(mon));
|
|
||||||
if (mon && (see_it || (!worm_tail && Detect_monsters))) {
|
if (mon && (see_it || (!worm_tail && Detect_monsters))) {
|
||||||
if (mon->mtrapped) {
|
if (mon->mtrapped) {
|
||||||
struct trap *trap = t_at(x, y);
|
struct trap *trap = t_at(x, y);
|
||||||
int tt = trap ? trap->ttyp : NO_TRAP;
|
int tt = trap ? trap->ttyp : NO_TRAP;
|
||||||
|
|
||||||
/* if monster is in a physical trap, you see the trap too
|
/* if monster is in a physical trap, you see trap too */
|
||||||
*/
|
if (tt == BEAR_TRAP || is_pit(tt) || tt == WEB)
|
||||||
if (tt == BEAR_TRAP || is_pit(tt)
|
trap->tseen = 1;
|
||||||
|| tt == WEB) {
|
|
||||||
trap->tseen = TRUE;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
_map_location(x, y, 0); /* map under the monster */
|
_map_location(x, y, 0); /* map under the monster */
|
||||||
/* also gets rid of any invisibility glyph */
|
/* also gets rid of any invisibility glyph */
|
||||||
@@ -795,7 +794,7 @@ register int x, y;
|
|||||||
worm_tail);
|
worm_tail);
|
||||||
} else if (mon && mon_warning(mon) && !is_worm_tail(mon)) {
|
} else if (mon && mon_warning(mon) && !is_worm_tail(mon)) {
|
||||||
display_warning(mon);
|
display_warning(mon);
|
||||||
} else if (glyph_is_invisible(levl[x][y].glyph)) {
|
} else if (glyph_is_invisible(lev->glyph)) {
|
||||||
map_invisible(x, y);
|
map_invisible(x, y);
|
||||||
} else
|
} else
|
||||||
_map_location(x, y, 1); /* map the location */\
|
_map_location(x, y, 1); /* map the location */\
|
||||||
@@ -808,19 +807,17 @@ register int x, y;
|
|||||||
|
|
||||||
if (canspotself())
|
if (canspotself())
|
||||||
display_self();
|
display_self();
|
||||||
} else if ((mon = m_at(x, y))
|
} else if ((mon = m_at(x, y)) != 0
|
||||||
&& ((see_it = (tp_sensemon(mon) || MATCH_WARN_OF_MON(mon)
|
&& ((see_it = (tp_sensemon(mon) || MATCH_WARN_OF_MON(mon)
|
||||||
|| (see_with_infrared(mon)
|
|| (see_with_infrared(mon)
|
||||||
&& mon_visible(mon))))
|
&& mon_visible(mon)))) != 0
|
||||||
|| Detect_monsters)) {
|
|| Detect_monsters)) {
|
||||||
/* Monsters are printed every time. */
|
/* Seen or sensed monsters are printed every time.
|
||||||
/* This also gets rid of any invisibility glyph */
|
This also gets rid of any invisibility glyph. */
|
||||||
display_monster(x, y, mon, see_it ? 0 : DETECTED,
|
display_monster(x, y, mon, see_it ? 0 : DETECTED,
|
||||||
is_worm_tail(mon) ? TRUE : FALSE);
|
is_worm_tail(mon) ? TRUE : FALSE);
|
||||||
} else if ((mon = m_at(x, y)) && mon_warning(mon)
|
} else if (mon && mon_warning(mon) && !is_worm_tail(mon)) {
|
||||||
&& !is_worm_tail(mon)) {
|
|
||||||
display_warning(mon);
|
display_warning(mon);
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If the location is remembered as being both dark (waslit is false)
|
* If the location is remembered as being both dark (waslit is false)
|
||||||
@@ -828,7 +825,6 @@ register int x, y;
|
|||||||
*
|
*
|
||||||
* (1) A dark location that the hero could see through night
|
* (1) A dark location that the hero could see through night
|
||||||
* vision.
|
* vision.
|
||||||
*
|
|
||||||
* (2) Darkened while out of the hero's sight. This can happen
|
* (2) Darkened while out of the hero's sight. This can happen
|
||||||
* when cursed scroll of light is read.
|
* when cursed scroll of light is read.
|
||||||
*
|
*
|
||||||
@@ -844,7 +840,7 @@ register int x, y;
|
|||||||
* These checks and changes must be here and not in back_to_glyph().
|
* These checks and changes must be here and not in back_to_glyph().
|
||||||
* They are dependent on the position being out of sight.
|
* They are dependent on the position being out of sight.
|
||||||
*/
|
*/
|
||||||
else if (Is_rogue_level(&u.uz)) {
|
} else if (Is_rogue_level(&u.uz)) {
|
||||||
if (lev->glyph == cmap_to_glyph(S_litcorr) && lev->typ == CORR)
|
if (lev->glyph == cmap_to_glyph(S_litcorr) && lev->typ == CORR)
|
||||||
show_glyph(x, y, lev->glyph = cmap_to_glyph(S_corr));
|
show_glyph(x, y, lev->glyph = cmap_to_glyph(S_corr));
|
||||||
else if (lev->glyph == cmap_to_glyph(S_room) && lev->typ == ROOM
|
else if (lev->glyph == cmap_to_glyph(S_room) && lev->typ == ROOM
|
||||||
@@ -852,8 +848,7 @@ register int x, y;
|
|||||||
show_glyph(x, y, lev->glyph = cmap_to_glyph(S_stone));
|
show_glyph(x, y, lev->glyph = cmap_to_glyph(S_stone));
|
||||||
else
|
else
|
||||||
goto show_mem;
|
goto show_mem;
|
||||||
}
|
} else if (!lev->waslit || (flags.dark_room && iflags.use_color)) {
|
||||||
else if (!lev->waslit || (flags.dark_room && iflags.use_color)) {
|
|
||||||
if (lev->glyph == cmap_to_glyph(S_litcorr) && lev->typ == CORR)
|
if (lev->glyph == cmap_to_glyph(S_litcorr) && lev->typ == CORR)
|
||||||
show_glyph(x, y, lev->glyph = cmap_to_glyph(S_corr));
|
show_glyph(x, y, lev->glyph = cmap_to_glyph(S_corr));
|
||||||
else if (lev->glyph == cmap_to_glyph(S_room) && lev->typ == ROOM)
|
else if (lev->glyph == cmap_to_glyph(S_room) && lev->typ == ROOM)
|
||||||
|
|||||||
Reference in New Issue
Block a user