public Room(Overviews overview, MinorFeatures minorFeature1, MinorFeatures minorFeature2, Sensories sensory, int x, int y) { Overview = overview; MinorFeature1 = minorFeature1; MinorFeature2 = minorFeature2; Sensory = sensory; RoomX = x; RoomY = y; FloorWeapon = null; }
public static string DescribeSensory(Sensories s) { switch (s) { case Sensories.Cold: return(" The air feels just a little bit chilly."); case Sensories.Dank: return(" Everything is unpleasantly damp and cold, and your skin starts to feel clammy."); case Sensories.Water: return(" There is a sound of rushing water far above you."); case Sensories.Shriek: return(" You hear an incredibly high pitched shrieking noise, but can't quite locate where it came from."); case Sensories.Hot: return(" The room is uncomfortably hot, and you start to sweat."); case Sensories.Echo: return(" The room seems to echo more than a room of this size should. You feel uneasy."); case Sensories.Eerie: return(" The room gives you a an eerie sense of impending doom. You cannot be certain why, but you don't want to stay in this room longer than you must."); case Sensories.Ominous: return(" This room feels wrong and unnatural."); case Sensories.Hunger: return(" This room makes you feel hungry."); case Sensories.Sleep: return(" This room makes you feel tired."); default: return(""); } }
/* * Static data for creating rooms */ public static Room GenerateRoom(Random rand, int x, int y) { Array ovs = Enum.GetValues(typeof(Overviews)); Overviews ov = (Overviews)ovs.GetValue(rand.Next(ovs.Length)); Array mfs = Enum.GetValues(typeof(MinorFeatures)); MinorFeatures mf1 = (MinorFeatures)ovs.GetValue(rand.Next(1, mfs.Length)); // Make sure it cant be None // 1/3 chance for a second minor feature MinorFeatures mf2 = MinorFeatures.None; if (rand.Next(2) == 0) { mf2 = (MinorFeatures)ovs.GetValue(rand.Next(1, mfs.Length)); // Make sure it cant be None } // 50% of a sensory Sensories sen = Sensories.None; if (rand.Next(1) == 0) { Array sens = Enum.GetValues(typeof(Sensories)); sen = (Sensories)sens.GetValue(rand.Next(sens.Length)); } return(new Room(ov, mf1, mf2, sen, x, y)); }