Subject: [PATCH] Spore colony

From: Michael Hedera <[email-masked]>
Date: 17 Aug 2001 08:57:13 -0000

Here's a short patch which adds one more room type: spore colony.
I hope it doesn't break anything - I tested it in wizmode with
"SHOPTYPE=p" and it worked as expected, but who knows.

--- include/mkroom.ori	Wed Aug 15 11:06:01 2001
+++ include/mkroom.h	Wed Aug 15 11:35:10 2001
@@ -61,19 +61,20 @@
 #define LEPREHALL	11	/* leprechaun hall (Tom Proudfoot) */
 #define COCKNEST	12	/* cockatrice nest (Tom Proudfoot) */
 #define ANTHOLE		13	/* ants (Tom Proudfoot) */
-#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 */
+#define SPORECOL	14	/* spore colony */
+#define SHOPBASE	15	/* everything above this is a shop */
+#define ARMORSHOP	16	/* specific shop defines for level compiler */
+#define SCROLLSHOP	17
+#define POTIONSHOP	18
+#define WEAPONSHOP	19
+#define FOODSHOP	20
+#define RINGSHOP	21
+#define WANDSHOP	22
+#define TOOLSHOP	23
+#define BOOKSHOP	24
+#define UNIQUESHOP	25	/* shops here & above not randomly gen'd. */
+#define CANDLESHOP	25
+#define MAXRTYPE	25	/* maximum valid room type */
 
 /* Special type for search_special() */
 #define ANY_TYPE	(-1)
--- src/hack.ori	Wed Aug 15 11:35:21 2001
+++ src/hack.c	Wed Aug 15 11:35:21 2001
@@ -1346,6 +1346,9 @@
 		case ANTHOLE:
 		    You("enter an anthole!");
 		    break;
+		case SPORECOL:
+		    You("enter a spore colony!");
+		    break;
 		case BARRACKS:
 		    if(monstinroom(&mons[PM_SOLDIER], roomno) ||
 			monstinroom(&mons[PM_SERGEANT], roomno) ||
--- src/mklev.ori	Wed Aug 15 11:35:21 2001
+++ src/mklev.c	Wed Aug 15 12:19:02 2001
@@ -732,6 +732,7 @@
 	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 > 10 && !rn2(8)) mkroom(SPORECOL);
 	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) &&
--- src/mkroom.ori	Wed Aug 15 11:35:21 2001
+++ src/mkroom.c	Wed Aug 15 11:35:21 2001
@@ -61,6 +61,7 @@
 	case LEPREHALL:	mkzoo(LEPREHALL); break;
 	case COCKNEST:	mkzoo(COCKNEST); break;
 	case ANTHOLE:	mkzoo(ANTHOLE); break;
+	case SPORECOL:  mkzoo(SPORECOL); break;
 	default:	impossible("Tried to make a room of type %d.", roomtype);
     }
 }
@@ -102,6 +103,10 @@
 				mkzoo(ANTHOLE);
 				return;
 			}
+			if(*ep == 'p' || *ep == 'P'){
+				mkzoo(SPORECOL);
+				return;
+			}
 			if(*ep == 'c' || *ep == 'C'){
 				mkzoo(COCKNEST);
 				return;
@@ -296,6 +301,7 @@
 			 &mons[PM_KILLER_BEE]) :
 		    (type == LEPREHALL) ? &mons[PM_LEPRECHAUN] :
 		    (type == COCKNEST) ? &mons[PM_COCKATRICE] :
+		    (type == SPORECOL) ? &mons[PM_GAS_SPORE] :
 		    (type == ANTHOLE) ? antholemon() :
 		    (struct permonst *) 0,
 		   sx, sy, NO_MM_FLAGS);