filled trap doors on castle can be re-dug

This commit is contained in:
nethack.allison
2005-01-08 14:37:36 +00:00
parent f8ea481ea1
commit 9a3022800b
7 changed files with 13 additions and 6 deletions

View File

@@ -72,6 +72,7 @@ mimic should not mimic a boulder while on a pit or hole location
reviving invisible troll could appear visible until it moves
adjust some of the shop repair messages
charge for reviving a shop owned corpse or reanimating a shop owned statue
filled trap doors on castle can be re-dug
Platform- and/or Interface-Specific Fixes

View File

@@ -340,6 +340,7 @@ struct rm {
Bitfield(waslit,1); /* remember if a location was lit */
Bitfield(roomno,6); /* room # for special rooms */
Bitfield(edge,1); /* marks boundaries for special rooms*/
Bitfield(candig,1); /* Exception to Can_dig_down; was a trapdoor */
};
/*

View File

@@ -2839,7 +2839,8 @@ do_break_wand(obj)
fillmsg = TRUE;
} else
digactualhole(x, y, BY_OBJECT,
(rn2(obj->spe) < 3 || !Can_dig_down(&u.uz)) ?
(rn2(obj->spe) < 3 ||
(!Can_dig_down(&u.uz) && !levl[x][y].candig)) ?
PIT : HOLE);
}
continue;

View File

@@ -186,7 +186,8 @@ dig_check(madeby, verbose, x, y)
} else if ((IS_ROCK(levl[x][y].typ) && levl[x][y].typ != SDOOR &&
(levl[x][y].wall_info & W_NONDIGGABLE) != 0)
|| (ttmp &&
(ttmp->ttyp == MAGIC_PORTAL || !Can_dig_down(&u.uz)))) {
(ttmp->ttyp == MAGIC_PORTAL ||
(!Can_dig_down(&u.uz) && !levl[x][y].candig)))) {
if(verbose) pline_The("%s here is too hard to %s.",
surface(x,y), verb);
return(FALSE);
@@ -513,7 +514,7 @@ int ttyp;
return;
}
if (ttyp != PIT && !Can_dig_down(&u.uz)) {
if (ttyp != PIT && (!Can_dig_down(&u.uz) && !lev->candig)) {
impossible("digactualhole: can't dig %s on this level.",
defsyms[trap_to_defsym(ttyp)].explanation);
ttyp = PIT;
@@ -676,7 +677,7 @@ boolean pit_only;
struct rm *lev = &levl[u.ux][u.uy];
struct obj *boulder_here;
schar typ;
boolean nohole = !Can_dig_down(&u.uz);
boolean nohole = (!Can_dig_down(&u.uz) && !lev->candig);
if ((ttmp && (ttmp->ttyp == MAGIC_PORTAL || nohole)) ||
(IS_ROCK(lev->typ) && lev->typ != SDOOR &&

View File

@@ -174,6 +174,8 @@ moverock()
deltrap(ttmp);
delobj(otmp);
bury_objs(rx, ry);
levl[rx][ry].wall_info &= ~W_NONDIGGABLE;
levl[rx][ry].candig = 1;
if (cansee(rx,ry)) newsym(rx,ry);
continue;
case LEVEL_TELEP:

View File

@@ -655,7 +655,7 @@ mon_tele:
pline_The("digging ray is ineffective.");
return 2;
}
if (!Can_dig_down(&u.uz)) {
if (!Can_dig_down(&u.uz) && !levl[mtmp->mx][mtmp->my].candig) {
if(canseemon(mtmp))
pline_The("%s here is too hard to dig in.",
surface(mtmp->mx, mtmp->my));

View File

@@ -333,7 +333,8 @@ boolean td; /* td == TRUE : trap door or hole */
if (In_sokoban(&u.uz) && Can_fall_thru(&u.uz))
; /* KMH -- You can't escape the Sokoban level traps */
else if(Levitation || u.ustuck || !Can_fall_thru(&u.uz)
else if(Levitation || u.ustuck
|| (!Can_fall_thru(&u.uz) && !levl[u.ux][u.uy].candig)
|| Flying || is_clinger(youmonst.data)
|| (Inhell && !u.uevent.invoked &&
newlevel == dunlevs_in_dungeon(&u.uz))