diff -Npbaur -x '*~' -x '#*#' nethack-3.4.3/include/extern.h nethack-rust/include/extern.h --- nethack-3.4.3/include/extern.h 2003-12-08 10:39:13.000000000 +1100 +++ nethack-rust/include/extern.h 2006-06-08 19:06:06.000000000 +1000 @@ -1196,6 +1196,7 @@ E boolean FDECL(onscary, (int,int,struct E void FDECL(monflee, (struct monst *, int, BOOLEAN_P, BOOLEAN_P)); E int FDECL(dochug, (struct monst *)); E int FDECL(m_move, (struct monst *,int)); +E void FDECL(dissolve_bars, (int,int)); E boolean FDECL(closed_door, (int,int)); E boolean FDECL(accessible, (int,int)); E void FDECL(set_apparxy, (struct monst *)); diff -Npbaur -x '*~' -x '#*#' nethack-3.4.3/src/hack.c nethack-rust/src/hack.c --- nethack-3.4.3/src/hack.c 2003-12-08 10:39:13.000000000 +1100 +++ nethack-rust/src/hack.c 2006-06-08 19:06:49.000000000 +1000 @@ -561,6 +561,11 @@ int mode; if (Passes_walls && may_passwall(x,y)) { ; /* do nothing */ } else if (tmpr->typ == IRONBARS) { + if ((dmgtype(youmonst.data, AD_RUST) || + dmgtype(youmonst.data, AD_CORR))) { + You("eat through the bars."); + dissolve_bars(x,y); + } if (!(Passes_walls || passes_bars(youmonst.data))) return FALSE; } else if (tunnels(youmonst.data) && !needspick(youmonst.data)) { diff -Npbaur -x '*~' -x '#*#' nethack-3.4.3/src/mondata.c nethack-rust/src/mondata.c --- nethack-3.4.3/src/mondata.c 2003-12-08 10:39:13.000000000 +1100 +++ nethack-rust/src/mondata.c 2006-06-08 18:32:06.000000000 +1000 @@ -252,8 +252,9 @@ boolean passes_bars(mptr) struct permonst *mptr; { - return (boolean) (passes_walls(mptr) || amorphous(mptr) || + return (boolean)(passes_walls(mptr) || amorphous(mptr) || is_whirly(mptr) || verysmall(mptr) || + dmgtype(mptr, AD_CORR) || dmgtype(mptr, AD_RUST) || (slithy(mptr) && !bigmonst(mptr))); } diff -Npbaur -x '*~' -x '#*#' nethack-3.4.3/src/monmove.c nethack-rust/src/monmove.c --- nethack-3.4.3/src/monmove.c 2003-12-08 10:39:13.000000000 +1100 +++ nethack-rust/src/monmove.c 2006-06-14 10:14:18.000000000 +1000 @@ -1125,7 +1125,14 @@ postmov: add_damage(mtmp->mx, mtmp->my, 0L); } } else if (levl[mtmp->mx][mtmp->my].typ == IRONBARS) { - if (flags.verbose && canseemon(mtmp)) + if (dmgtype(ptr,AD_RUST) || dmgtype(ptr,AD_CORR)) { + if (canseemon(mtmp)) { + pline("%s eats through the iron bars.", + Monnam(mtmp)); + } + dissolve_bars(mtmp->mx, mtmp->my); + } + else if (flags.verbose && canseemon(mtmp)) Norep("%s %s %s the iron bars.", Monnam(mtmp), /* pluralization fakes verb conjugation */ makeplural(locomotion(ptr, "pass")), @@ -1217,6 +1224,14 @@ postmov: #endif /* OVL0 */ #ifdef OVL2 +void +dissolve_bars(x, y) +register int x, y; +{ + levl[x][y].typ = (Is_special(&u.uz) || *in_rooms(x,y,0)) ? ROOM : CORR; + newsym(x, y); +} + boolean closed_door(x, y) register int x, y;