Merge branch 'NetHack-3.6.2'
This commit is contained in:
10
src/mklev.c
10
src/mklev.c
@@ -503,8 +503,7 @@ int trap_type;
|
||||
if (trap_type || !rn2(4)) {
|
||||
rm->typ = SCORR;
|
||||
if (trap_type) {
|
||||
if ((trap_type == HOLE || trap_type == TRAPDOOR)
|
||||
&& !Can_fall_thru(&u.uz))
|
||||
if (is_hole(trap_type) && !Can_fall_thru(&u.uz))
|
||||
trap_type = ROCKTRAP;
|
||||
ttmp = maketrap(xx, yy + dy, trap_type);
|
||||
if (ttmp) {
|
||||
@@ -1345,15 +1344,14 @@ coord *tm;
|
||||
} while (kind == NO_TRAP);
|
||||
}
|
||||
|
||||
if ((kind == TRAPDOOR || kind == HOLE) && !Can_fall_thru(&u.uz))
|
||||
if (is_hole(kind) && !Can_fall_thru(&u.uz))
|
||||
kind = ROCKTRAP;
|
||||
|
||||
if (tm) {
|
||||
m = *tm;
|
||||
} else {
|
||||
register int tryct = 0;
|
||||
boolean avoid_boulder = (kind == PIT || kind == SPIKED_PIT
|
||||
|| kind == TRAPDOOR || kind == HOLE);
|
||||
boolean avoid_boulder = (is_pit(kind) || is_hole(kind));
|
||||
|
||||
do {
|
||||
if (++tryct > 200)
|
||||
@@ -1393,7 +1391,7 @@ coord *tm;
|
||||
in a pit and yet not be able to identify that the pit is there. */
|
||||
if (lvl <= (unsigned) rnd(4)
|
||||
&& kind != SQKY_BOARD && kind != RUST_TRAP
|
||||
&& kind != PIT && kind != SPIKED_PIT && kind < HOLE) {
|
||||
&& !is_pit(kind) && kind < HOLE) {
|
||||
/* Object generated by the trap; initially NULL, stays NULL if
|
||||
we fail to generate an object or if the trap doesn't
|
||||
generate objects. */
|
||||
|
||||
Reference in New Issue
Block a user