//chamber or cavern public string Chamber() { Randomizer r = new Randomizer(); Encounter e = new Encounter(); Dressing d = new Dressing(); string _rm; int check = r.RandNumber(1, 22); if (check < 18) { //stoneworked chamber _rm = "The room you've found is a stoneworked chamber. It is " + ChamberSize() + NumberOfExits() + d.RoomDress() + RoomContents(); return _rm; } else if (check < 22) { //natural cavern _rm = "The room you've found is a natural cavern. It is " + CavernSize() + NumberOfExits() + d.RoomDress() + RoomContents(); return _rm; } else { //special room _rm = "The room you've found is " + SpecialRoom() + NumberOfExits() + d.RoomDress() + RoomContents(); return _rm; } }
public string AllHall() { Encounter e = new Encounter(); Randomizer r = new Randomizer(); string _dir; //************************************************************************************************************************************** //*********************************** CONTROL DENSITY OF ROOMS HERE AND BELOW **************************************** //************************************************************************************************************************************** int rand = r.RandNumber(1, 45 + roomFreq); //NOT WORKING if (rand < 14) { _dir = "continues straight for " + Feet() + " The passage is " + PassWidth(); } //1-13 else if (rand < 15) { _dir = "comes to a T. The right continues for " + Feet() + " and the left continues for " + Feet() + " These passages are " + PassWidth(); }//14 else if (rand < 16) { _dir = "comes to a 4-way intersection. The right continues for " + Feet() + ", the left continues for " + Feet() + " and the hallway continues straight for " + Feet() + " These passages are " + PassWidth(); } //15 else if (rand < 18) { _dir = "continues straight for " + Feet() + ". It also branches left and then continues for " + Feet() + " These passages are " + PassWidth(); } // 16-17 else if (rand < 23) { _dir = "turns left and then continues for " + Feet() + " The passage is " + PassWidth(); } //18-22 else if (rand < 25) { _dir = "continues straight for " + Feet() + ". It also branches right and then continues for " + Feet() + " These passages are " + PassWidth(); }//23-24 else if (rand < 29) { _dir = "turns right and then continues for " + Feet() + " The passage is " + PassWidth(); }//25-28 else if (rand < 38) { _dir = "ends at a room." + " The passage is " + PassWidth(); }//29-37 else if (rand < 40) { _dir = "ends at a door." + " The passage is " + PassWidth() + AfterDoor(); }//38-39 else if (rand < 42) { _dir = "reveals a wandering monster. The passage is " + PassWidth(); }//40-41 else if (rand < 43) { _dir = "reveals " + Stairs() + " The passage is " + PassWidth(); } //42 else if (rand < 44) { _dir = "terminates at a dead end." + SecretDoor() + " The passage is " + PassWidth(); } //43 else { _dir = "ends at a room." + " The passage is " + PassWidth(); } //44 and above if (_dir.Contains("straight")) { numOfStraights++; } return _dir; }
public string NoStraight() { //roomFreq = 0; Encounter e = new Encounter(); Randomizer r = new Randomizer(); string _dir; //************************************************************************************************************************************** //*********************************** CONTROL DENSITY OF ROOMS HERE AND ABOVE **************************************** //************************************************************************************************************************************** int rand = r.RandNumber(1, 25 + roomFreq); //NOT WORKING if (rand < 9) { _dir = "turns left and then continues for " + Feet() + " The passage is " + PassWidth();} //1-8 else if (rand < 17) {_dir = "ends at a room." + " The passage is " + PassWidth();} //9-16 else if (rand < 20) { _dir = "ends at a door." + " The passage is " + PassWidth() + AfterDoor(); } //17-19 else if (rand < 23) { _dir = "reveals " + e.Wandering() + ". The passage is " + PassWidth(); } //20-22 else if (rand < 24) { _dir = "terminates at a dead end." + SecretDoor() + " The passage is " + PassWidth();} //23 else {_dir = "ends at a room." + " The passage is " + PassWidth();} //24 and > numOfStraights = 0; return _dir; }
private void btnMap_Click(object sender, EventArgs e) { tbChaRes.Text = ""; tbEncRes.Text = ""; tbPasRes.Text = ""; tbTreRes.Text = ""; if (cbRoomFreq.Text == "Few") { roomFreq = 2; } else if (cbRoomFreq.Text == "Moderate") { roomFreq = 4; } else if (cbRoomFreq.Text == "Average") { roomFreq = 6; } else if (cbRoomFreq.Text == "More") { roomFreq = 8; } else if (cbRoomFreq.Text == "Many") { roomFreq = 10; } else { roomFreq = 0; } if (cbHallDist.Text == "Shortest") { roomSpread = 0; } else if (cbHallDist.Text == "Short") { roomSpread = 1; } else if (cbHallDist.Text == "Moderate") { roomSpread = 2; } else if (cbHallDist.Text == "Long") { roomSpread = 3; } else if (cbHallDist.Text == "Longest") { roomSpread = 4; } else { roomSpread = 0; } Passage p = new Passage(); p.SetupRollMods(roomFreq, roomSpread); //main generate methods...// RoomChamber rc = new RoomChamber(); Encounter en = new Encounter(); Treasure t = new Treasure(); tbPasRes.Text = p.PassageChk(); if (tbPasRes.Text.Contains("wandering monster")) { tbEncRes.Text = en.Wandering(); } if (tbPasRes.Text.Contains("room")) { tbChaRes.Text = rc.Chamber(); } if (tbChaRes.Text.Contains("an encounter")) { tbEncRes.Text = en.Monster(); } if (tbChaRes.Text.Contains("treasure")) { tbTreRes.Text = t.TreasureRoll(); } //#################################################################################################################################### //#################################################################################################################################### // #################### need to check reg to see if anything saved, if not popup setup form. ######################################### //#################################################################################################################################### //#################################################################################################################################### }
private void btnEncRRoll_Click(object sender, EventArgs e) { //encounter re-roll Encounter en = new Encounter(); tbEncRes.Text = en.Monster(); }
//Table 8 Chamber or Room Contents ==> goto table 9 public string RoomContents() { Passage p = new Passage(); Treasure t = new Treasure(); Encounter e = new Encounter(); string _cont; List<string> l = new List<string>(); l.Add("The room is mostly empty. ");//needs dressing l.Add("The room is mostly empty. "); l.Add("The room is mostly empty. "); l.Add("The room is mostly empty. "); l.Add("The room is mostly empty. "); l.Add("The room is mostly empty. "); l.Add("The room is mostly empty. "); l.Add("The room contains an encounter. "); l.Add("The room contains an encounter. "); l.Add("The room contains an encounter. "); l.Add("The room contains an encounter. "); l.Add("The room contains an encounter and treasure. "); l.Add("The room contains an encounter and treasure. "); l.Add("The room contains an encounter and treasure. "); l.Add("The room contains an encounter and treasure. "); l.Add("The room contains an encounter and treasure. "); l.Add("The room contains an encounter and treasure. "); l.Add("The room contains " + p.Stairs()); l.Add("The room contains a trap. " + t.Trap()); l.Add("The room contains only treasure. "); //////////////////// TREASURE!!!! Randomizer r = new Randomizer(); int rand = r.RandNumber(1, l.Count); var value = l[rand]; _cont = value.ToString(); return _cont; }
public string Pool() { Encounter e = new Encounter(); string _pool; List<string> l = new List<string>(); l.Add(". "); l.Add(". "); l.Add(". "); l.Add(". "); l.Add(". "); l.Add(". "); l.Add(". "); l.Add(". "); l.Add(". "); l.Add(". "); l.Add(". "); l.Add("that contains a pool. "); l.Add("that contains a pool. "); l.Add("that contains a pool with an encounter . "); l.Add("that contains a pool with an encounter . "); l.Add("that contains a pool with an encounter and a treasure. "); l.Add("that contains a pool with an encounter and a treasure. "); l.Add("that contains a pool with an encounter and a treasure. "); l.Add("that contains a magic pool that " + MagicPool()); Randomizer r = new Randomizer(); int rand = r.RandNumber(1, l.Count); var value = l[rand]; _pool = value.ToString(); return _pool; }