Merge branch 'trapdoor-consistency' of https://github.com/entrez/NetHack into pr574

This commit is contained in:
nhmall
2021-08-12 08:55:29 -04:00
2 changed files with 12 additions and 8 deletions
+10 -7
View File
@@ -245,14 +245,17 @@ flooreffects(struct obj *obj, int x, int y, const char *verb)
res = water_damage(obj, NULL, FALSE) == ER_DESTROYED; res = 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) || uescaped_shaft(t))) { && (uteetering_at_seen_pit(t) || uescaped_shaft(t))) {
if (Blind && !Deaf) if (is_pit(t->ttyp)) {
You_hear("%s tumble downwards.", the(xname(obj))); if (Blind && !Deaf)
else You_hear("%s tumble downwards.", the(xname(obj)));
pline("%s %s into %s %s.", The(xname(obj)), else
otense(obj, "tumble"), the_your[t->madeby_u], pline("%s into %s pit.", Tobjnam(obj, "tumble"),
is_pit(t->ttyp) ? "pit" : "hole"); the_your[t->madeby_u]);
if (is_hole(t->ttyp) && ship_object(obj, x, y, FALSE)) } else if (ship_object(obj, x, y, FALSE)) {
/* ship_object will print an appropriate "the item falls
* through the hole" message, so no need to do it here. */
res = TRUE; res = TRUE;
}
} 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) {
+2 -1
View File
@@ -3431,7 +3431,8 @@ look_here(int obj_cnt, /* obj_cnt > 0 implies that autopickup is in progress */
} }
if (dfeature && !drift && !strcmp(dfeature, surface(u.ux, u.uy))) if (dfeature && !drift && !strcmp(dfeature, surface(u.ux, u.uy)))
dfeature = 0; /* ice already identified */ dfeature = 0; /* ice already identified */
if (!can_reach_floor(TRUE)) { trap = t_at(u.ux, u.uy);
if (!can_reach_floor(trap && is_pit(trap->ttyp))) {
pline("But you can't reach it!"); pline("But you can't reach it!");
return 0; return 0;
} }