diff -Nurd --exclude-from=ignore.txt terrain-nethack-3.4.3/include/mkroom.h nethack-3.4.3/include/mkroom.h --- terrain-nethack-3.4.3/include/mkroom.h 2004-06-24 00:59:36.000000000 +0000 +++ nethack-3.4.3/include/mkroom.h 2003-12-07 18:39:14.000000000 +0000 @@ -61,21 +61,19 @@ #define LEPREHALL 11 /* leprechaun hall (Tom Proudfoot) */ #define COCKNEST 12 /* cockatrice nest (Tom Proudfoot) */ #define ANTHOLE 13 /* ants (Tom Proudfoot) */ -#define ISLAND 14 /* ringed by water, contains items */ -#define RIVER 15 /* "room" is really a river running through the level*/ -#define SHOPBASE 16 /* everything above this is a shop */ -#define ARMORSHOP 17 /* specific shop defines for level compiler */ -#define SCROLLSHOP 18 -#define POTIONSHOP 19 -#define WEAPONSHOP 20 -#define FOODSHOP 21 -#define RINGSHOP 22 -#define WANDSHOP 23 -#define TOOLSHOP 24 -#define BOOKSHOP 25 -#define UNIQUESHOP 26 /* shops here & above not randomly gen'd. */ -#define CANDLESHOP 26 -#define MAXRTYPE 26 /* maximum valid room type */ +#define SHOPBASE 14 /* everything above this is a shop */ +#define ARMORSHOP 15 /* specific shop defines for level compiler */ +#define SCROLLSHOP 16 +#define POTIONSHOP 17 +#define WEAPONSHOP 18 +#define FOODSHOP 19 +#define RINGSHOP 20 +#define WANDSHOP 21 +#define TOOLSHOP 22 +#define BOOKSHOP 23 +#define UNIQUESHOP 24 /* shops here & above not randomly gen'd. */ +#define CANDLESHOP 24 +#define MAXRTYPE 24 /* maximum valid room type */ /* Special type for search_special() */ #define ANY_TYPE (-1) diff -Nurd --exclude-from=ignore.txt terrain-nethack-3.4.3/include/rm.h nethack-3.4.3/include/rm.h --- terrain-nethack-3.4.3/include/rm.h 2004-06-24 00:59:36.000000000 +0000 +++ nethack-3.4.3/include/rm.h 2003-12-07 18:39:14.000000000 +0000 @@ -453,10 +453,8 @@ Bitfield(has_beehive, 1); Bitfield(has_barracks, 1); Bitfield(has_temple, 1); - Bitfield(has_island, 1); Bitfield(has_swamp, 1); - Bitfield(has_river, 1); Bitfield(noteleport,1); Bitfield(hardfloor,1); Bitfield(nommap,1); diff -Nurd --exclude-from=ignore.txt terrain-nethack-3.4.3/src/mklev.c nethack-3.4.3/src/mklev.c --- terrain-nethack-3.4.3/src/mklev.c 2004-06-24 15:25:48.000000000 +0000 +++ nethack-3.4.3/src/mklev.c 2003-12-07 18:39:14.000000000 +0000 @@ -577,8 +577,6 @@ level.flags.has_barracks = 0; level.flags.has_temple = 0; level.flags.has_swamp = 0; - level.flags.has_island = 0; - level.flags.has_river = 0; level.flags.noteleport = 0; level.flags.hardfloor = 0; level.flags.nommap = 0; @@ -726,56 +724,25 @@ #ifdef WIZARD if(wizard && nh_getenv("SHOPTYPE")) mkroom(SHOPBASE); else #endif - -/* New room selection code: - We divide special rooms into different types and put up to one of each in - the level. Because there are only so many suitable rooms on each - random map, levels with two kinds of rooms still aren't too common, - and I've yet to see three in tests. - Also, we separate out level-wide specials, like swamps, - and give them the chance to forbid special rooms from appearing. - */ - - /* Part one: early level-wide modifications */ - if (u_depth > 15 && !rn2(8)) { - mkroom(SWAMP); - goto skiprooms; - } - - /* Part two: special rooms */ - /* Shops */ if (u_depth > 1 && u_depth < depth(&medusa_level) && nroom >= room_threshold && rn2(u_depth) < 3) mkroom(SHOPBASE); - - /* Zoos */ - if (u_depth > 4 && !rn2(6)) mkroom(COURT); + else if (u_depth > 4 && !rn2(6)) mkroom(COURT); else if (u_depth > 5 && !rn2(8) && !(mvitals[PM_LEPRECHAUN].mvflags & G_GONE)) mkroom(LEPREHALL); else if (u_depth > 6 && !rn2(7)) mkroom(ZOO); + else if (u_depth > 8 && !rn2(5)) mkroom(TEMPLE); else if (u_depth > 9 && !rn2(5) && !(mvitals[PM_KILLER_BEE].mvflags & G_GONE)) mkroom(BEEHIVE); else if (u_depth > 11 && !rn2(6)) mkroom(MORGUE); else if (u_depth > 12 && !rn2(8)) mkroom(ANTHOLE); else if (u_depth > 14 && !rn2(4) && !(mvitals[PM_SOLDIER].mvflags & G_GONE)) mkroom(BARRACKS); + else if (u_depth > 15 && !rn2(6)) mkroom(SWAMP); else if (u_depth > 16 && !rn2(8) && !(mvitals[PM_COCKATRICE].mvflags & G_GONE)) mkroom(COCKNEST); - - /* Terrain */ - if (u_depth > 2 && !rn2(8)) mkroom(ISLAND); - else if (u_depth > 8 && !rn2(7)) mkroom(TEMPLE); - - /* Part three: late modifications */ - /* Rivers on vault levels are buggy, so we forbid that. - Islands + rivers are potentially too blocking, - so no that either. */ - if (u_depth > 3 && !rn2(4) && - !level.flags.has_vault && !level.flags.has_island) mkroom(RIVER); - } - -skiprooms: + } #ifdef REINCARNATION skip0: diff -Nurd --exclude-from=ignore.txt terrain-nethack-3.4.3/src/mkroom.c nethack-3.4.3/src/mkroom.c --- terrain-nethack-3.4.3/src/mkroom.c 2004-06-24 17:39:24.000000000 +0000 +++ nethack-3.4.3/src/mkroom.c 2003-12-07 18:39:14.000000000 +0000 @@ -17,13 +17,9 @@ #ifdef OVLB STATIC_DCL boolean FDECL(isbig, (struct mkroom *)); -STATIC_DCL boolean FDECL(isspacious, (struct mkroom *)); STATIC_DCL struct mkroom * FDECL(pick_room,(BOOLEAN_P)); STATIC_DCL void NDECL(mkshop), FDECL(mkzoo,(int)), NDECL(mkswamp); STATIC_DCL void NDECL(mktemple); -STATIC_DCL void NDECL(mkisland); -STATIC_DCL void NDECL(mkriver); -STATIC_DCL void FDECL(liquify, (xchar, xchar, boolean)); STATIC_DCL coord * FDECL(shrine_pos, (int)); STATIC_DCL struct permonst * NDECL(morguemon); STATIC_DCL struct permonst * NDECL(antholemon); @@ -47,17 +43,6 @@ return((boolean)( area > 20 )); } - -/* Returns true if room has both an X and Y size of at least five. */ -STATIC_OVL boolean -isspacious(sroom) -register struct mkroom *sroom; -{ - return((boolean)( ((sroom->hx - sroom-> lx)+1) >= 5 && - (((sroom->hy - sroom->ly)+1) >=5 ) )); -} - - void mkroom(roomtype) /* make and stock a room of a given type */ @@ -76,8 +61,6 @@ case LEPREHALL: mkzoo(LEPREHALL); break; case COCKNEST: mkzoo(COCKNEST); break; case ANTHOLE: mkzoo(ANTHOLE); break; - case ISLAND: mkisland(); break; - case RIVER: mkriver(); break; default: impossible("Tried to make a room of type %d.", roomtype); } } @@ -135,10 +118,6 @@ mkswamp(); return; } - if(*ep == 'w' || *ep == 'W'){ - mkisland(); - return; - } for(i=0; shtypes[i].name; i++) if(*ep == def_oc_syms[(int)shtypes[i].symb]) goto gottype; @@ -501,117 +480,6 @@ } } - -STATIC_OVL void -mkriver() /* John Harris */ -{ - register int center, width, prog, fill, edge; - register int x, y; - level.flags.has_river = 1; - - if (!rn2(4)) { /* Horizontal river */ - center = rn2(ROWNO-12)+6; - width = rn2(4)+4; - for (prog = 1; prog4) {width--;} - else if (width <7) {width++;} - } - - if (!rn2(3)) { - if (!rn2(2) && (center-width/2) >1) {center--;} - else if ((center+width/2) < ROWNO-1) {center++;} - } - - /* Make sure river doesn't stray off map */ - if (center < 4) {center = 4;} - if (center > (ROWNO-5)) {center = ROWNO-5;} - } - } - else { /* Vertical river */ - center = rn2(COLNO-14)+7; - width = rn2(4)+5; - for (prog = 1; prog5) {width--;} - else if (width <8) {width++;} - } - - if (!rn2(3)) { - if (!rn2(2) && (center-width/2) >1) {center--;} - else if ((center+width/2) < ROWNO-1) {center++;} - } - - /* Sanity checking */ - if (center < 5) {center = 5;} - if (center > (COLNO-6)) {center = COLNO-6;} - } - } - -} - - -/* This isn't currently used anywhere. It liquifies the whole level. */ -STATIC_OVL void -mksea() /* John Harris */ -{ - register int x, y; -/*level.flags.has_river = 1;*/ - for (x=1 ; x <= COLNO-1 ; x++) { - for (y=1 ; y <= ROWNO-1 ; y++) { - liquify(x,y, FALSE); - }; - } -} - - -STATIC_OVL void -liquify(x, y, edge) -register xchar x, y; -register boolean edge; /* Allows room walls to intrude slightly into river. */ -{ - register int typ = levl[x][y].typ; - register int monster = PM_JELLYFISH; - /* Don't liquify shop walls */ - if (level.flags.has_shop && *in_rooms(x, y, SHOPBASE)) {return;} - - if (typ == STONE || (IS_WALL(typ) && !edge && rn2(3))) - {levl[x][y].typ = POOL;} - else if ((typ == SCORR || typ == CORR || IS_DOOR(typ) - || typ == SDOOR) && !IS_WALL(typ)) { - levl[x][y].typ = ROOM; - } - /* Leave boulders scattered around, dislodged by erosion. - Also, because they are fun to push into water. Plunk! */ - if (levl[x][y].typ == ROOM && !rn2(13)) - (void) mksobj_at(BOULDER, x, y, TRUE, FALSE); - - /* Sea monsters */ - if (levl[x][y].typ == POOL && !rn2(85-depth(&u.uz))) { - if (depth(&u.uz) > 19 && !rn2(3)) {monster = PM_ELECTRIC_EEL;} - else if (depth(&u.uz) > 15 && !rn2(3)) {monster = PM_GIANT_EEL;} - else if (depth(&u.uz) > 11 && !rn2(2)) {monster = PM_SHARK;} - else if (depth(&u.uz) > 7 && rn2(4)) {monster = PM_PIRANHA;} - (void) makemon(&mons[monster], x, y, NO_MM_FLAGS); - } - - /* Underground rivers are relatively open spaces, so light them. */ - levl[x][y].lit = 1; -} - STATIC_OVL coord * shrine_pos(roomno) int roomno; @@ -648,147 +516,6 @@ level.flags.has_temple = 1; } -STATIC_OVL void -mkisland() /* John Harris, modified from mktemple & mkshop, - with ideas and aid from Pasi Kallinen.*/ -{ - register struct mkroom *sroom; - register struct rm *lev; - register int x, y, dif, ptype, pxwidth, pywidth; - register int txoff, tyoff, tspot, tdx, tdy; - register int mx, my, montype; - register struct obj *otmp; - register struct obj *ogold; - register int u_depth = depth(&u.uz); - - /*An island room has a row of water or lava along the inside of the - wall of the room. Because this can block progress, it has to be - done carefully.... - - In case someone wants to do something more with this, here's the - rationale behind the choices I've made: - - Stairs inside the moat could prevent the player from leaving the level - or room, so that should always be forbidden. - A one-door room ensures this room isn't a necessary juncture between - staircases. - Deeper in the dungeon (past the mines, certainly) it becomes less - likely that the player will be held back by a single room, so beyond - level five the restrictions are relaxed a bit. - In case the player teleports into the room or falls into it from above, - we always generate a trap door inside it so the player can escape. - - Specifics of room placement & types: - If we're on or before level four, island rooms can only be made - in the same kinds of places as shops. This prevents the player - from being utterly blocked by the island, but it also makes them - quite rare in that area. - If we're at level five or below we're after the Mines, so a pick-axe - is almost guarenteed, so we can place islands in more places. - Starting with level six, if the room is big enough we may make some - extra water. - From level twelve down, we may use lava instead of water. - - Note: this code depends on the room being rectangular. - */ - for(sroom = &rooms[0]; ; sroom++){ - if(sroom->hx < 0) return; /* from mkshop: Signifies out of rooms? */ - if(sroom - rooms >= nroom) { - pline("rooms not closed by -1?"); - return; - } - - if(sroom->rtype != OROOM || !isspacious(sroom) || - has_dnstairs(sroom) || has_upstairs(sroom)) - continue; - if( sroom->doorct == 1 || (u_depth > 4 && sroom->doorct != 0)) break; - } - - level.flags.has_island = 1; - - if (!rn2(3) && u_depth > 11) {ptype = LAVAPOOL;} - else {ptype = POOL;}; - - if ( u_depth > 5 ) { - pxwidth = ((sroom->hx - sroom-> lx) > 6) ? 2 : 1; - pywidth = ((sroom->hy - sroom-> ly) > 6) ? 2 : 1; - } - else {pxwidth = pywidth = 1;} - - /* Reveal secret doors and liquify borders */ - for(x = sroom->lx; x <= sroom->hx; x++) { - if (levl[x][sroom->hy+1].typ == SDOOR) - {levl[x][sroom->hy+1].typ = DOOR;} - if (levl[x][sroom->ly-1].typ == SDOOR) - {levl[x][sroom->ly-1].typ = DOOR;} - levl[x][sroom->hy].typ = ptype; - levl[x][sroom->ly].typ = ptype; - if (pywidth == 2) { - levl[x][sroom->hy-1].typ = ptype; - levl[x][sroom->ly+1].typ = ptype; - } - } - for(y = (sroom->ly); y <= (sroom->hy); y++) { - if (levl[sroom->hx+1][y].typ == SDOOR) - {levl[sroom->hx+1][y].typ = DOOR;} - if (levl[sroom->lx-1][y].typ == SDOOR) - {levl[sroom->lx-1][y].typ = DOOR;} - levl[sroom->hx][y].typ = ptype; - levl[sroom->lx][y].typ = ptype; - if (pxwidth == 2) { - levl[sroom->hx-1][y].typ = ptype; - levl[sroom->lx+1][y].typ = ptype; - } - } - - /* Find the center of the room */ - x = (((sroom->hx - sroom->lx) / 2) + sroom->lx); - y = (((sroom->hy - sroom->ly) / 2) + sroom->ly); - - /* Make the treasure, add gold to it, bury & mark it */ - otmp = mksobj_at(CHEST, x, y, TRUE, TRUE); - ogold = mkgold((long)rn1(u_depth * 100 + 200, 250), x, y); - remove_object(ogold); - (void) add_to_container(otmp, ogold); - bury_an_obj(otmp); - make_engr_at(x,y,"X",0,ENGRAVE); - - /* Put a tree next to the spot - (all desert islands have exactly one palm tree on them)*/ - tspot = rn2(8); - if (tspot < 3) {tyoff = -1;} - else if (tspot > 3 && tspot != 7) {tyoff = 1;} - else tyoff = 0; - if (tspot == 0 || tspot > 5) {txoff = -1;} - else if (tspot > 1 && tspot < 5) {txoff = 1;} - else txoff = 0; - - levl[x+txoff][y+tyoff].typ = TREE; - - /* Add a trap door in case the player gets stuck here. */ - do { - tdx = rn2(sroom->hx - sroom->lx + 1 - pxwidth * 2) + sroom->lx + pxwidth; - tdy = rn2(sroom->hy - sroom->ly + 1 - pywidth * 2) + sroom->ly + pywidth; - } while (((tdx == x)&&(tdy == y)) || - ((tdx == x + txoff) && (tdy == y + tyoff))); - - maketrap(tdx, tdy, TRAPDOOR); - - /* If level 9 or deeper, and the moat is water, maybe make a sea monster. - (Eels earlier in the dungeon might be too hard and/or produce - too many experience points.) */ - if (u_depth > 8 && ptype == POOL) { - /* Make in the corners. */ - if (rn2(2)) { - mx = (rn2(2)) ? sroom->hx : sroom->lx; - my = (rn2(2)) ? sroom->hy : sroom->ly; - (void) makemon(rn2(2) ? &mons[PM_GIANT_EEL] - : &mons[PM_ELECTRIC_EEL], mx, my, NO_MM_FLAGS); - } - } - level.flags.has_island = TRUE; -} - boolean nexttodoor(sx,sy) register int sx, sy; diff -Nurd --exclude-from=ignore.txt terrain-nethack-3.4.3/src/sounds.c nethack-3.4.3/src/sounds.c --- terrain-nethack-3.4.3/src/sounds.c 2004-06-24 15:28:36.000000000 +0000 +++ nethack-3.4.3/src/sounds.c 2003-12-07 18:39:14.000000000 +0000 @@ -206,15 +206,6 @@ } } } - if (level.flags.has_island && !rn2(200)) { - static const char *island_msg[3] = { - "hear seagulls.", - "hear burly voices singing shanties.", - "here someone ask about warez.", - }; - You(island_msg[rn2(2)+hallu]); - return; - } if (level.flags.has_zoo && !rn2(200)) { static const char * const zoo_msg[3] = { "a sound reminiscent of an elephant stepping on a peanut.",