Merge branch 'NetHack-3.6'
This commit is contained in:
@@ -314,6 +314,7 @@ clairvoyance showed all monsters in range, then after player viewed the map,
|
|||||||
did a normal monster refresh; the 'I' glyph step clobbers remembered
|
did a normal monster refresh; the 'I' glyph step clobbers remembered
|
||||||
object at same spot, so skip it for locations where monster refresh
|
object at same spot, so skip it for locations where monster refresh
|
||||||
is going to immediately redisplay a monster
|
is going to immediately redisplay a monster
|
||||||
|
take holes that you avoided into consideration when you're on the brink
|
||||||
unix: fix double DLB definition in linux hints file
|
unix: fix double DLB definition in linux hints file
|
||||||
windows: fix --showpaths output for the data file which relies on being
|
windows: fix --showpaths output for the data file which relies on being
|
||||||
constructed programmatically to incorporate the version suffix
|
constructed programmatically to incorporate the version suffix
|
||||||
|
|||||||
@@ -2631,6 +2631,7 @@ E int FDECL(launch_obj, (SHORT_P, int, int, int, int, int));
|
|||||||
E boolean NDECL(launch_in_progress);
|
E boolean NDECL(launch_in_progress);
|
||||||
E void NDECL(force_launch_placement);
|
E void NDECL(force_launch_placement);
|
||||||
E boolean FDECL(uteetering_at_seen_pit, (struct trap *));
|
E boolean FDECL(uteetering_at_seen_pit, (struct trap *));
|
||||||
|
E boolean FDECL(uescaped_shaft, (struct trap *));
|
||||||
E boolean NDECL(lava_effects);
|
E boolean NDECL(lava_effects);
|
||||||
E void NDECL(sink_into_lava);
|
E void NDECL(sink_into_lava);
|
||||||
E void NDECL(sokoban_guilt);
|
E void NDECL(sokoban_guilt);
|
||||||
|
|||||||
@@ -1167,7 +1167,7 @@ struct obj *obj;
|
|||||||
You("cannot stay under%s long enough.",
|
You("cannot stay under%s long enough.",
|
||||||
is_pool(u.ux, u.uy) ? "water" : " the lava");
|
is_pool(u.ux, u.uy) ? "water" : " the lava");
|
||||||
} else if ((trap = t_at(u.ux, u.uy)) != 0
|
} else if ((trap = t_at(u.ux, u.uy)) != 0
|
||||||
&& uteetering_at_seen_pit(trap)) {
|
&& (uteetering_at_seen_pit(trap) || uescaped_shaft(trap))) {
|
||||||
dotrap(trap, FORCEBUNGLE);
|
dotrap(trap, FORCEBUNGLE);
|
||||||
/* might escape trap and still be teetering at brink */
|
/* might escape trap and still be teetering at brink */
|
||||||
if (!u.utrap)
|
if (!u.utrap)
|
||||||
|
|||||||
11
src/do.c
11
src/do.c
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 do.c $NHDT-Date: 1574722862 2019/11/25 23:01:02 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.193 $ */
|
/* NetHack 3.6 do.c $NHDT-Date: 1575056306 2019/11/29 19:38:26 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.195 $ */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/*-Copyright (c) Derek S. Ray, 2015. */
|
/*-Copyright (c) Derek S. Ray, 2015. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
@@ -244,12 +244,13 @@ const char *verb;
|
|||||||
}
|
}
|
||||||
return water_damage(obj, NULL, FALSE) == ER_DESTROYED;
|
return water_damage(obj, NULL, FALSE) == ER_DESTROYED;
|
||||||
} else if (u.ux == x && u.uy == y && (t = t_at(x, y)) != 0
|
} else if (u.ux == x && u.uy == y && (t = t_at(x, y)) != 0
|
||||||
&& uteetering_at_seen_pit(t)) {
|
&& (uteetering_at_seen_pit(t) || uescaped_shaft(t))) {
|
||||||
if (Blind && !Deaf)
|
if (Blind && !Deaf)
|
||||||
You_hear("%s tumble downwards.", the(xname(obj)));
|
You_hear("%s tumble downwards.", the(xname(obj)));
|
||||||
else
|
else
|
||||||
pline("%s %s into %s pit.", The(xname(obj)),
|
pline("%s %s into %s %s.", The(xname(obj)),
|
||||||
otense(obj, "tumble"), the_your[t->madeby_u]);
|
otense(obj, "tumble"), the_your[t->madeby_u],
|
||||||
|
is_pit(t->ttyp) ? "pit" : "hole");
|
||||||
} else if (obj->globby) {
|
} else if (obj->globby) {
|
||||||
/* Globby things like puddings might stick together */
|
/* Globby things like puddings might stick together */
|
||||||
while (obj && (otmp = obj_nexto_xy(obj, x, y, TRUE)) != 0) {
|
while (obj && (otmp = obj_nexto_xy(obj, x, y, TRUE)) != 0) {
|
||||||
@@ -996,7 +997,7 @@ dodown()
|
|||||||
}
|
}
|
||||||
if (!stairs_down && !ladder_down) {
|
if (!stairs_down && !ladder_down) {
|
||||||
trap = t_at(u.ux, u.uy);
|
trap = t_at(u.ux, u.uy);
|
||||||
if (trap && uteetering_at_seen_pit(trap)) {
|
if (trap && (uteetering_at_seen_pit(trap) || uescaped_shaft(trap))) {
|
||||||
dotrap(trap, TOOKPLUNGE);
|
dotrap(trap, TOOKPLUNGE);
|
||||||
return 1;
|
return 1;
|
||||||
} else if (!trap || !is_hole(trap->ttyp)
|
} else if (!trap || !is_hole(trap->ttyp)
|
||||||
|
|||||||
@@ -156,7 +156,8 @@ boolean check_pit;
|
|||||||
if (u.usteed && P_SKILL(P_RIDING) < P_BASIC)
|
if (u.usteed && P_SKILL(P_RIDING) < P_BASIC)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (check_pit && !Flying
|
if (check_pit && !Flying
|
||||||
&& (t = t_at(u.ux, u.uy)) != 0 && uteetering_at_seen_pit(t))
|
&& (t = t_at(u.ux, u.uy)) != 0
|
||||||
|
&& (uteetering_at_seen_pit(t) || uescaped_shaft(t)))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
return (boolean) ((!Levitation || Is_airlevel(&u.uz)
|
return (boolean) ((!Levitation || Is_airlevel(&u.uz)
|
||||||
|
|||||||
@@ -2634,8 +2634,10 @@ pickup_checks()
|
|||||||
}
|
}
|
||||||
if (!can_reach_floor(TRUE)) {
|
if (!can_reach_floor(TRUE)) {
|
||||||
struct trap *traphere = t_at(u.ux, u.uy);
|
struct trap *traphere = t_at(u.ux, u.uy);
|
||||||
if (traphere && uteetering_at_seen_pit(traphere))
|
if (traphere
|
||||||
You("cannot reach the bottom of the pit.");
|
&& (uteetering_at_seen_pit(traphere) || uescaped_shaft(traphere)))
|
||||||
|
You("cannot reach the bottom of the %s.",
|
||||||
|
is_pit(traphere->ttyp) ? "pit" : "abyss");
|
||||||
else if (u.usteed && P_SKILL(P_RIDING) < P_BASIC)
|
else if (u.usteed && P_SKILL(P_RIDING) < P_BASIC)
|
||||||
rider_cant_reach();
|
rider_cant_reach();
|
||||||
else if (Blind && !can_reach_floor(TRUE))
|
else if (Blind && !can_reach_floor(TRUE))
|
||||||
|
|||||||
@@ -509,7 +509,7 @@ int what; /* should be a long */
|
|||||||
if (!can_reach_floor(TRUE)) {
|
if (!can_reach_floor(TRUE)) {
|
||||||
if ((g.multi && !g.context.run) || (autopickup && !flags.pickup)
|
if ((g.multi && !g.context.run) || (autopickup && !flags.pickup)
|
||||||
|| ((ttmp = t_at(u.ux, u.uy)) != 0
|
|| ((ttmp = t_at(u.ux, u.uy)) != 0
|
||||||
&& uteetering_at_seen_pit(ttmp)))
|
&& (uteetering_at_seen_pit(ttmp) || uescaped_shaft(ttmp))))
|
||||||
read_engr_at(u.ux, u.uy);
|
read_engr_at(u.ux, u.uy);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ dosit()
|
|||||||
|
|
||||||
if (OBJ_AT(u.ux, u.uy)
|
if (OBJ_AT(u.ux, u.uy)
|
||||||
/* ensure we're not standing on the precipice */
|
/* ensure we're not standing on the precipice */
|
||||||
&& !uteetering_at_seen_pit(trap)) {
|
&& !(uteetering_at_seen_pit(trap) || uescaped_shaft(trap))) {
|
||||||
register struct obj *obj;
|
register struct obj *obj;
|
||||||
|
|
||||||
obj = g.level.objects[u.ux][u.uy];
|
obj = g.level.objects[u.ux][u.uy];
|
||||||
|
|||||||
20
src/trap.c
20
src/trap.c
@@ -5083,11 +5083,21 @@ boolean
|
|||||||
uteetering_at_seen_pit(trap)
|
uteetering_at_seen_pit(trap)
|
||||||
struct trap *trap;
|
struct trap *trap;
|
||||||
{
|
{
|
||||||
if (trap && trap->tseen && (!u.utrap || u.utraptype != TT_PIT)
|
return (trap && is_pit(trap->ttyp) && trap->tseen
|
||||||
&& is_pit(trap->ttyp))
|
&& trap->tx == u.ux && trap->ty == u.uy
|
||||||
return TRUE;
|
&& !(u.utrap && u.utraptype == TT_PIT));
|
||||||
else
|
}
|
||||||
return FALSE;
|
|
||||||
|
/*
|
||||||
|
* Returns TRUE if you didn't fall through a hole or didn't
|
||||||
|
* release a trap door
|
||||||
|
*/
|
||||||
|
boolean
|
||||||
|
uescaped_shaft(trap)
|
||||||
|
struct trap *trap;
|
||||||
|
{
|
||||||
|
return (trap && is_hole(trap->ttyp) && trap->tseen
|
||||||
|
&& trap->tx == u.ux && trap->ty == u.uy);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Destroy a trap that emanates from the floor. */
|
/* Destroy a trap that emanates from the floor. */
|
||||||
|
|||||||
Reference in New Issue
Block a user