public string DxRoll() { Passage p = new Passage(); string _roll; List<string> l = new List<string>(); l.Add("3 dice vs. DX."); l.Add("3 dice vs. DX."); l.Add("3 dice vs. DX."); l.Add("3 dice vs. DX."); l.Add("3 dice vs. DX."); l.Add("3 dice vs. DX."); l.Add("3 dice vs. DX."); l.Add("3 dice vs. DX."); l.Add("4 dice vs. DX."); l.Add("4 dice vs. DX."); l.Add("4 dice vs. DX."); l.Add("5 dice vs. DX."); l.Add("5 dice vs. DX."); l.Add("6 dice vs. DX."); Randomizer r = new Randomizer(); int rand = r.RandNumber(1, l.Count); var value = l[rand]; _roll = value.ToString(); return _roll; }
private void btnPasRRoll_Click(object sender, EventArgs e) { //passage re-roll Passage ps = new Passage(); tbPasRes.Text = ps.PassageChk(); }
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. ######################################### //#################################################################################################################################### //#################################################################################################################################### }
//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; }