Example #1
0
        public string Elevator()
        {
            string _el;
            List<string> l = new List<string>();

            l.Add("that descend 1 level. ");
            l.Add("that descend 1 level. ");
            l.Add("that descend 1 level. ");
            l.Add("that descend 1 level. ");
            l.Add("that descend 1 level. ");
            l.Add("that descends 2 levels. ");
            l.Add("that descends 3 levels. ");
            l.Add("that ascend 1 level. ");
            l.Add("that ascend 1 level. ");
            l.Add("that descend 1 level. ");
            l.Add("that descend 1 level. ");
            l.Add("that descend 1 level. ");
            l.Add("that rises up 1 level. ");
            l.Add("that rises up 2 levels. ");
            l.Add("that drops down 2 levels. ");
            l.Add("that drops down 1 level. ");
            l.Add("that drops down 1 level. ");
            l.Add("that drops down 2 levels. ");

            Randomizer r = new Randomizer();
            int rand = r.RandNumber(1, l.Count);
            var value = l[rand];
            _el = value.ToString();
            return _el;
        }
Example #2
0
        public string CavernSize()
        {
            string _cave;
            List<string> l = new List<string>();

            l.Add(" 10 x 20 ft. ");
            l.Add(" 20 x 20 ft. ");
            l.Add(" 20 x 20 ft. ");
            l.Add(" 30 x 30 ft. ");
            l.Add(" 30 x 30 ft. ");
            l.Add(" 40 x 40 ft. ");
            l.Add(" 40 x 40 ft. ");
            l.Add(" 20 x 30 ft. ");
            l.Add(" 20 x 30 ft. ");
            l.Add(" 20 x 40 ft. ");
            l.Add(" 20 x 40 ft. ");
            l.Add(" 20 x 40 ft. ");
            l.Add(" 40 x 50 ft. ");
            l.Add(" 40 x 50 ft. ");
            l.Add(" 40 x 60 ft. ");
            l.Add(" 40 x 60 ft. ");

            Randomizer r = new Randomizer();
            int rand = r.RandNumber(1, l.Count);
            var value = l[rand];
            _cave = value.ToString();
            return _cave;
        }
Example #3
0
        public string AfterDoor()
        {
            string _beyond;
            List<string> l = new List<string>();

            l.Add("After the door you find another side door to the left, and one straight ahead. ");
            l.Add("After the door you find another side door to the left, and one straight ahead. ");
            l.Add("After the door you find another side door to the right, and one straight ahead. ");
            l.Add("After the door you find another side door to the right, and one straight ahead. ");
            l.Add("After the door the passage continues straight for " + Feet());
            l.Add("After the door the passage continues straight for " + Feet());
            l.Add("After the door the passage continues straight for " + Feet());
            l.Add("After the door the passage continues straight for " + Feet());
            l.Add("After the door the passage continues straight for " + Feet());
            l.Add("After the door there is a room.");
            l.Add("After the door there is a room.");
            l.Add("After the door there is a room.");
            //l.Add("After the door there is a room.");
            l.Add("After the door there is a room.");
            l.Add("After the door there is a room.");
            l.Add("After the door there is a room.");
            l.Add("After the door there is a room.");
            l.Add("After the door there is a room.");
            l.Add("After the door there is a room.");

            Randomizer r = new Randomizer();
            int rand = r.RandNumber(1, l.Count);
            var value = l[rand];
            _beyond = value.ToString();
            return _beyond;
        }
Example #4
0
        public string Easy()
        {
            Form1 f1 = new Form1();
            string easy, creature;
            List<string> l = new List<string>();

            l.Add(f1.easyCreature1);
            l.Add(f1.easyCreature2);
            l.Add(f1.easyCreature3);
            l.Add(f1.easyCreature4);
            l.Add(f1.easyCreature5);
            l.Add(f1.easyCreature6);
            Randomizer r = new Randomizer();
            int rand = r.RandNumber(1, l.Count);
            var value = l[rand];
            creature = value.ToString();

            if (rand == 0){from = Convert.ToInt16(f1.easyFrom1); to = Convert.ToInt16(f1.easyTo1);}
            else if (rand == 1) { from = Convert.ToInt16(f1.easyFrom2); to = Convert.ToInt16(f1.easyTo2); }
            else if (rand == 2) { from = Convert.ToInt16(f1.easyFrom3); to = Convert.ToInt16(f1.easyTo3); }
            else if (rand == 3) { from = Convert.ToInt16(f1.easyFrom4); to = Convert.ToInt16(f1.easyTo4); }
            else if (rand == 4) { from = Convert.ToInt16(f1.easyFrom5); to = Convert.ToInt16(f1.easyTo5); }
            else if (rand == 5) { from = Convert.ToInt16(f1.easyFrom6); to = Convert.ToInt16(f1.easyTo6); }
            string num = r.RandNumber(from, to).ToString();
            easy = creature+"("+num+")";
            return easy;
        }
Example #5
0
        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;
        }
Example #6
0
        //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;
            }
        }
Example #7
0
        public string CaveSize()
        {
            string _cave;
            List<string> l = new List<string>();

            l.Add("40x60 ft. cave ");
            l.Add("40x60 ft. cave ");
            l.Add("40x60 ft. cave ");
            l.Add("40x60 ft. cave ");
            l.Add("40x60 ft. cave ");
            l.Add("50x75 ft. cave ");
            l.Add("50x75 ft. cave ");
            l.Add("30x30 ft and 60x60 ft. double cave ");
            l.Add("30x30 ft and 60x60 ft. double cave ");
            l.Add("30x50 ft and 80x100 ft. double cave ");
            l.Add("30x50 ft and 80x100 ft. double cave ");
            l.Add("100x125 ft. cave ");
            l.Add("100x125 ft. cave ");
            l.Add("100x125 ft. cave ");
            l.Add("125x150 ft. cave ");
            l.Add("125x150 ft. cave ");
            l.Add("150x200 ft. cave ");
            l.Add("150x200 ft. cave ");
            l.Add("300x400 ft. cave ");
            l.Add("300x400 ft. cave ");

            Randomizer r = new Randomizer();
            int rand = r.RandNumber(1, l.Count);
            var value = l[rand];
            _cave = value.ToString();
            return _cave;
        }
Example #8
0
        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;
        }
Example #9
0
        public string Gem()
        {
            string gem;
            Randomizer r = new Randomizer();
            Form1 f1 = new Form1();
            List<string> l = new List<string>();
            l.Add("and a " + f1.gem1 + " worth " + f1.gem1val);
            l.Add("and a " + f1.gem2 + " worth " + f1.gem2val);
            l.Add("and a " + f1.gem3 + " worth " + f1.gem3val);
            l.Add("and a " + f1.gem4 + " worth " + f1.gem4val);
            l.Add("and a " + f1.gem5 + " worth " + f1.gem5val);
            l.Add("and a " + f1.gem6 + " worth " + f1.gem6val);

            int rand = r.RandNumber(1, l.Count);
            var value = l[rand];
            gem = value.ToString();
            return gem;
        }
Example #10
0
        public string GreaterMagic()
        {
            string greater;
            Randomizer r = new Randomizer();
            Form1 f1 = new Form1();
            List<string> l = new List<string>();
            l.Add("and (" + f1.greater1val + ") " + f1.greater1 + ".");
            l.Add("and (" + f1.greater2val + ") " + f1.greater2 + ".");
            l.Add("and (" + f1.greater3val + ") " + f1.greater3 + ".");
            l.Add("and (" + f1.greater4val + ") " + f1.greater4 + ".");
            l.Add("and (" + f1.greater5val + ") " + f1.greater5 + ".");
            l.Add("and (" + f1.greater6val + ") " + f1.greater6 + ".");

            int rand = r.RandNumber(1, l.Count);
            var value = l[rand];
            greater = value.ToString();
            return greater;
        }
Example #11
0
        //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;
        }
Example #12
0
        public string SpecialRoomSize()
        {
            Randomizer r = new Randomizer();
            int dist = r.RandNumber(3, 15);

            string _size;
            List<string> l = new List<string>();

            l.Add("and is " + (dist + 1 * 10) + " ft. across. ");
            l.Add("and is " + (dist + 1 * 10) + " ft. across. ");
            l.Add("and is " + (dist + 1 * 10) + " ft. across. ");
            l.Add("and is " + (dist + 2 * 10) + " ft. across. ");
            l.Add("and is " + (dist + 2 * 10) + " ft. across. ");
            l.Add("and is " + (dist + 2 * 10) + " ft. across. ");
            l.Add("and is " + (dist + 5 * 10) + " ft. across. ");
            l.Add("and is " + (dist + 5 * 10) + " ft. across. ");
            l.Add("and is " + (dist + 6 * 10) + " ft. across. ");
            l.Add("and is " + (dist + 6 * 10) + " ft. across. ");
            l.Add("and is " + (dist + 4 * 10) + " ft. across. ");
            l.Add("and is " + (dist + 4 * 10) + " ft. across. ");
            l.Add("and is " + (dist + 3 * 10) + " ft. across. ");
            l.Add("and is " + (dist + 3 * 10) + " ft. across. ");
            l.Add("and is " + (dist + 3 * 10) + " ft. across. ");

            int rand = r.RandNumber(1, l.Count);
            var value = l[rand];
            _size = value.ToString();
            return _size;
        }
Example #13
0
        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;
        }
Example #14
0
        public string Trap()
        {
            Randomizer r = new Randomizer();
            int die1 = r.RandNumber(1, 6);
            int die2 = r.RandNumber(1, 6) + r.RandNumber(1, 6);
            int die3 = r.RandNumber(1, 6) + r.RandNumber(1, 6) + r.RandNumber(1, 6);
            int die4 = r.RandNumber(1, 6) + r.RandNumber(1, 6) + r.RandNumber(1, 6) + r.RandNumber(1, 6);
            int die5 = r.RandNumber(1, 6) + r.RandNumber(1, 6) + r.RandNumber(1, 6) + r.RandNumber(1, 6) + r.RandNumber(1, 6);
            int die6 = r.RandNumber(1, 6) + r.RandNumber(1, 6) + r.RandNumber(1, 6) + r.RandNumber(1, 6) + r.RandNumber(1, 6) + r.RandNumber(1, 6);

            string _trap;
            List<string> l = new List<string>();

            l.Add("The trap is acid spray which deals " + die2 + " damage to those failing a save of " + DxRoll() + ". ");
            l.Add("The trap is a crossbow bolt which deals " + die3 + " damage to those failing a save of ." + DxRoll() + ". ");
            l.Add("The trap involves a collapsing bridge.  The fall causes " + die3 + " damage to those failing a save of " + DxRoll() + ". ");
            l.Add("The trap involves an illusory bridge.  The fall causes " + die4 + " damage to those failing a save of " + DxRoll() + ". ");
            l.Add("The trap causes heavy caltrops to drop from ceiling dealing " + die1 + " damage to those failing a save of " + DxRoll() + ". ");
            l.Add("The trap involves a ceiling block which drops behind characters.  This does no harm, but those failing a DX roll of " + DxRoll() + " are trapped. ");
            l.Add("The trap involves a ceiling block which drops in front of and behind players. This does no harm, but those failing a DX roll of " + DxRoll() + " are trapped. ");
            l.Add("The trap involves a ceiling block which drops in front of characters.  This does no harm, but those failing a DX roll of " + DxRoll() + " are trapped. ");
            l.Add("The trap is a ceiling block which drops on the characters dealing " + die4 + " damage to those failing a save of " + DxRoll() + ". ");
            l.Add("The trap is a ceiling block that seals characters failing a save of " + DxRoll() + " in room or area");
            l.Add("The trap is an elevator room" + Elevator() + ". ");
            l.Add("The trap is an elevator " + Elevator() + " then deactivates for " + die1 + " hours. ");
            l.Add("The trap is a one-way elevator room " + Elevator());
            l.Add("The trap is a falling door that does " + die2 + " damage to those failing a save of " + DxRoll() + ". ");
            l.Add("The trap is a set of flame jets that does " + die4 + " damage to those failing a save of " + DxRoll() + ". ");
            l.Add("The trap is a flooding room that kills characters failing a save of " + DxRoll() + ". ");
            l.Add("The trap is a blinding gas that leaves any character failing a save of " + DxRoll() + " blind for " + die2 + " turns. ");
            l.Add("The trap is fear gas that leaves any character failing a save of " + DxRoll() + " afraid and unable to fight for " + die2 + " turns. ");
            l.Add("The trap is a flammable gas that ignites and does " + die3 + " damage to those failing a save of " + DxRoll() + ". ");
            l.Add("The trap is a sleep gas that leaves any character failing a save of " + DxRoll() + " asleep for " + die2 + " turns. ");
            l.Add("The trap is a lethargy gas.  Any character failing a save of " + DxRoll() + " has their MA reduced by half for " + die4 + " turns. ");
            l.Add("The trap is a greased chute " + Elevator() + " and does " + die2 + " damage to those failing a save of " + DxRoll() + ". ");
            l.Add("The trap is a magical lightning bolt that does " + die4 + " damage to those failing a save of " + DxRoll() + ". ");
            l.Add("The trap is a swinging log that does " + die4 + " damage to those failing a save of " + DxRoll() + ". ");
            l.Add("The trap is an obscuring fog which lasts for " + die2 + " turns. ");
            l.Add("The trap consists of an oil filled pit with dropping lit torch that does " + die5 + " damage to those failing a save of " + DxRoll() + ". ");
            l.Add("The trap is a pit triggered by false door that does " + die1 + " damage to those failing a save of " + DxRoll() + ". ");
            l.Add("The trap is a pit with dropping ceiling block that does " + die6 + " damage to those failing a save of " + DxRoll() + ". ");
            l.Add("The trap is a pit with locking trap door that does " + die2 + " damage to those failing a save of " + DxRoll() + ". ");
            l.Add("The trap is a 10 ft pit that does " + die1 + " damage to those failing a save of " + DxRoll() + ". ");
            l.Add("The trap is a poisoned bolt-crossbow that does " + die5 + " damage to those failing a save of " + DxRoll() + ". ");
            l.Add("The trap consists of poisoned caltrops that do " + die3 + " damage to those failing a save of " + DxRoll() + ". ");
            l.Add("The trap is a poisoned ballista that does " + die5 + " damage to those failing a save of " + DxRoll() + ". ");
            l.Add("The trap is a poisoned spike pit that does " + die3 + " damage to those failing a save of " + DxRoll() + ". ");
            l.Add("The trap is a portcullis that drops behind the characters. ");
            l.Add("The trap consists of portcullises which drop in front of and behind characters, trapping them. ");
            l.Add("The trap is a portcullis which drops in front of players. ");
            l.Add("The trap consists of a rolling stone ball which is the height and width of the corridor that does " + die6 + " crushing damage to those failing a save of " + DxRoll() + ". ");
            l.Add("The trap is a scything ankle high that does " + die3 + " damage to those failing a save of " + DxRoll() + ". ");
            l.Add("The trap is a scything neck high that does " + die4 + " damage to those failing a save of " + DxRoll() + ". ");
            l.Add("The trap consists of a sliding room that changes facing or location. ");
            l.Add("The trap is a ballista that does " + die4 + " damage to those failing a save of " + DxRoll() + ". ");
            l.Add("The trap is a swinging spiked log that does " + die5 + " damage to those failing a save of " + DxRoll() + ". ");
            l.Add("The trap is a spiked pit that does " + die2 + " damage to those failing a save of " + DxRoll() + ". ");
            l.Add("The trap is a spring-loaded piledriver disguised as a door that does " + die5 + " damage to those failing a save of " + DxRoll() + ". ");
            l.Add("The trap consists of stairs which descend one level and fold flat into a sliding chute and do " + die1 + " damage to those failing a save of " + DxRoll() + ". ");
            l.Add("The trap consists of collapsing stairs which descend one level and do " + die1 + " damage to those failing a save of " + DxRoll() + ". ");
            l.Add("The trap consists of a magic teleporter that teleports one character to a random room on the same level. ");
            l.Add("The trap is a trip wire which trips the first character failing a save of " + DxRoll() + ". ");
            l.Add("wire-neck high that does " + die2 + " damage to those failing a save of " + DxRoll() + ". ");

            int rand = r.RandNumber(1, l.Count);
            var value = l[rand];
            _trap = value.ToString();
            return _trap;
        }
Example #15
0
        public string Potion()
        {
            string gem;
            Randomizer r = new Randomizer();
            Form1 f1 = new Form1();
            List<string> l = new List<string>();
            l.Add("and (" + f1.potion1val + ") "+ f1.potion1);
            l.Add("and (" + f1.potion2val + ") " + f1.potion2);
            l.Add("and (" + f1.potion3val + ") " + f1.potion3);
            l.Add("and (" + f1.potion4val + ") " + f1.potion4);
            l.Add("and (" + f1.potion5val + ") " + f1.potion5);
            l.Add("and (" + f1.potion6val + ") " + f1.potion6);

            int rand = r.RandNumber(1, l.Count);
            var value = l[rand];
            gem = value.ToString();
            return gem;
        }
Example #16
0
        public string PersTreasure(string level)
        {
            int x;
            if (level == "Low") { x = 1; }
            else if (level == "Medium") { x = 2; }
            else { x = 5; }

            Randomizer r = new Randomizer();
            int d1 = r.RandNumber(1, 6)*x;
            int d2 = r.RandNumber(1, 10)*x;
            int d3 = r.RandNumber(1, 20)*x;
            int d4 = r.RandNumber(1, 100)*x;

            string copper = Convert.ToString(d4) + " copper coins";
            string silver = Convert.ToString(d3) + " silver coins";
            string gold = Convert.ToString(d2) + " gold coins";
            string platinum = Convert.ToString(d1) + " platinum coins";

            if (level == "Low")
            {

                string _roll;
                List<string> l = new List<string>();

                l.Add(copper);
                l.Add(copper);
                l.Add(copper);
                l.Add(copper+" and "+silver);
                l.Add(copper + " and " + silver);
                l.Add(copper + " and " + silver);
                l.Add(copper + " and " + silver);
                l.Add(copper + ", " + silver+" and " +gold);
                l.Add(copper + ", " + silver + " and " + gold);
                l.Add(copper + ", " + silver + " and " + gold);
                l.Add(copper + ", " + silver + ", " + gold+" and "+Gem());
                l.Add(copper + ", " + silver + ", " + gold + " and " + Potion());
                l.Add(copper + ", " + silver + ", " + gold + " and " + LesserMagic());

                int rand = r.RandNumber(1, l.Count);
                var value = l[rand];
                _roll = value.ToString();
                return _roll;
            }

            else if (level == "Medium")
            {

                string _roll;
                List<string> l = new List<string>();

                l.Add(silver);
                l.Add(silver);
                l.Add(silver);
                l.Add(silver);
                l.Add(silver + " and " + gold);
                l.Add(silver + " and " + gold);
                l.Add(silver + " and " + gold);
                l.Add(silver + ", " + gold+" and "+platinum);
                l.Add(gold + ", " + platinum + " and " + Gem());
                l.Add(gold + ", " + platinum + " and " + Potion());
                l.Add(gold + ", " + platinum + " and " + LesserMagic());

                int rand = r.RandNumber(1, l.Count);
                var value = l[rand];
                _roll = value.ToString();
                return _roll;
            }

            else
            {

                string _roll;
                List<string> l = new List<string>();

                l.Add(gold);
                l.Add(gold);
                l.Add(gold);
                l.Add(gold);
                l.Add(gold + " and " + platinum);
                l.Add(gold + " and " + platinum);
                l.Add(gold + " and " + gold);
                l.Add(gold + ", " + platinum + ", " + Gem()+" and "+Potion());
                l.Add(gold + ", " + platinum + ", " + Gem() + " and " + Potion());
                l.Add(gold + ", " + platinum + ", " + Gem() + " and " + Potion());
                l.Add(gold + ", " + platinum + ", " + Gem() + " and " + Potion());
                l.Add(gold + ", " + platinum + ", " + Gem() + " and " + LesserMagic());
                l.Add(gold + ", " + platinum + ", " + Gem() + " and " + LesserMagic());
                l.Add(gold + ", " + platinum + ", " + Gem() + " and " + LesserMagic());
                l.Add(gold + ", " + platinum + ", " + Gem() + " and " + GreaterMagic());
                l.Add(gold + ", " + platinum + ", " + Gem() + " and " + GreaterMagic());
                l.Add(gold + ", " + platinum + ", " + Gem() + ", " + Potion() + ", "+LesserMagic()+" and "+ GreaterMagic());

                int rand = r.RandNumber(1, l.Count);
                var value = l[rand];
                _roll = value.ToString();
                return _roll;
            }
        }
Example #17
0
        public string LesserMagic()
        {
            string lesser;
            Randomizer r = new Randomizer();
            Form1 f1 = new Form1();
            List<string> l = new List<string>();
            l.Add("and (" + f1.lesser1val + ") " + f1.lesser1);
            l.Add("and (" + f1.lesser2val + ") " + f1.lesser2);
            l.Add("and (" + f1.lesser3val + ") " + f1.lesser3);
            l.Add("and (" + f1.lesser4val + ") " + f1.lesser4);
            l.Add("and (" + f1.lesser5val + ") " + f1.lesser5);
            l.Add("and (" + f1.lesser6val + ") " + f1.lesser6);

            int rand = r.RandNumber(1, l.Count);
            var value = l[rand];
            lesser = value.ToString();
            return lesser;
        }
Example #18
0
        private void btnCombatRoll_Click(object sender, EventArgs e)
        {
            if (cbCombatAdjDx.Text == "") { MessageBox.Show("You must first choose an Adjusted Dexterity before rolling."); }
            else if (cbCombatDmgDie.Text == "") { MessageBox.Show("You must first choose a Damage Die before rolling."); }
            else if (cbCombatDmgMod.Text == "") { MessageBox.Show("You must first choose a Damage Mod before rolling."); }
            else if (cbCombatDefenderHitStop.Text == "") { MessageBox.Show("You must first choose a Defender Armor Mod before rolling."); }
            else
            {
                Randomizer r = new Randomizer();
                Randomizer r2 = new Randomizer();
                Randomizer r3 = new Randomizer();
                int adjDx = Convert.ToInt16(cbCombatAdjDx.Text);
                int dmgDie = Convert.ToInt16(cbCombatDmgDie.Text);
                int dmgMod = Convert.ToInt16(cbCombatDmgMod.Text);
                int defense = Convert.ToInt16(cbCombatDefenderHitStop.Text);
                int dice = dmgDie;

                do
                {
                    int temp = r.RandNumber(1, 6) + dmgMod;
                    points = points + temp;
                    dice--;
                } while (dice > 0);

                string result;
                int roll = r.RandNumber(1, 6) + r2.RandNumber(1, 6) + r3.RandNumber(1, 6);
                if (roll <= adjDx)
                {
                    //success
                    result = "The attacker landed a hit.  Defender loses " + (points-defense) + " points from their Current ST." +
                        Environment.NewLine+"You can make the adjustment on the Combat Tracker.";
                    MessageBox.Show(result);
                    points = 0;
                }
                else
                {
                    //fail
                    result = "The attacker has missed.";
                    MessageBox.Show(result);
                    points = 0;
                }
                points = 0;
            }
        }
Example #19
0
 public string Monster()
 {
     string creature;
     Randomizer r = new Randomizer();
     int roll = r.RandNumber(1, 10);
     if (roll < 6) { creature = Easy(); }
     else if (roll < 8) { creature = Moderate(); }
     else if (roll < 10) { creature = Difficult(); }
     else { creature = Wandering(); }
     return creature;
 }
Example #20
0
        //table 12
        public string TreasureAmount()
        {
            string _amt;
            Randomizer r = new Randomizer();
            List<string> l = new List<string>();
            //guarded by monster == x2, multiples for difficulty
            l.Add("The treasure contains " + r.RandNumber(2, 20) * 100 + "cp. ");
            l.Add("The treasure contains " + r.RandNumber(2, 20) * 100 + "cp. ");
            l.Add("The treasure contains " + r.RandNumber(2, 20) * 100 + "cp. ");
            l.Add("The treasure contains " + r.RandNumber(2, 20) * 100 + "cp. ");
            l.Add("The treasure contains " + r.RandNumber(2, 20) * 100 + "cp. ");
            l.Add("The treasure contains " + r.RandNumber(2, 20) * 100 + "sp. ");
            l.Add("The treasure contains " + r.RandNumber(2, 20) * 100 + "sp. ");
            l.Add("The treasure contains " + r.RandNumber(2, 20) * 100 + "sp. ");
            l.Add("The treasure contains " + r.RandNumber(2, 20) * 100 + "sp. ");
            l.Add("The treasure contains " + r.RandNumber(2, 20) * 100 + "sp. ");
            l.Add("The treasure contains " + r.RandNumber(2, 16) * 100 + "ep. ");
            l.Add("The treasure contains " + r.RandNumber(2, 16) * 100 + "ep. ");
            l.Add("The treasure contains " + r.RandNumber(2, 16) * 100 + "ep. ");
            l.Add("The treasure contains " + r.RandNumber(1, 4) * 100 + "gp. ");
            l.Add("The treasure contains " + r.RandNumber(1, 4) * 100 + "gp. ");
            l.Add("The treasure contains " + r.RandNumber(1, 4) * 100 + "gp. ");
            l.Add("The treasure contains " + r.RandNumber(2, 20) * 10 + "pp. ");
            l.Add("The treasure contains " + r.RandNumber(2, 20) * 10 + "pp. ");
            l.Add("The treasure contains " + r.RandNumber(2, 20) * 100 + "cp. ");
            l.Add("The treasure contains " + r.RandNumber(2, 20) * 100 + "cp. ");
            l.Add("The treasure contains " + r.RandNumber(2, 20) * 100 + "cp. ");
            l.Add("The treasure contains " + r.RandNumber(2, 20) * 100 + "cp. ");
            l.Add("The treasure contains " + r.RandNumber(2, 20) * 100 + "cp. ");
            l.Add("The treasure contains " + r.RandNumber(2, 20) * 100 + "sp. ");
            l.Add("The treasure contains " + r.RandNumber(2, 20) * 100 + "sp. ");
            l.Add("The treasure contains " + r.RandNumber(2, 20) * 100 + "sp. ");
            l.Add("The treasure contains " + r.RandNumber(2, 20) * 100 + "sp. ");
            l.Add("The treasure contains " + r.RandNumber(2, 20) * 100 + "sp. ");
            l.Add("The treasure contains " + r.RandNumber(2, 16) * 100 + "ep. ");
            l.Add("The treasure contains " + r.RandNumber(2, 16) * 100 + "ep. ");
            l.Add("The treasure contains " + r.RandNumber(2, 16) * 100 + "ep. ");
            l.Add("The treasure contains " + r.RandNumber(1, 4) * 100 + "gp. ");
            l.Add("The treasure contains " + r.RandNumber(1, 4) * 100 + "gp. ");
            l.Add("The treasure contains " + r.RandNumber(1, 4) * 100 + "gp. ");
            l.Add("The treasure contains " + r.RandNumber(2, 20) * 10 + "pp. ");
            l.Add("The treasure contains " + r.RandNumber(2, 20) * 10 + "pp. ");
            l.Add("The treasure contains " + r.RandNumber(1, 4) * 100 + "gp. "+Gem()+".");//gem
            l.Add("The treasure contains " + r.RandNumber(1, 4) * 100 + "gp. " + Gem() + ".");//gem
            l.Add("The treasure contains " + r.RandNumber(1, 4) * 100 + "gp. " + Gem() + ".");//gem
            l.Add("The treasure contains " + r.RandNumber(1, 4) * 100 + "gp. " + Gem() + ".");//gem
            l.Add("The treasure contains " + r.RandNumber(1, 4) * 100 + "gp. " + Potion() + ".");//potion
            l.Add("The treasure contains " + r.RandNumber(1, 4) * 100 + "gp. " + Potion() + ".");//potion
            l.Add("The treasure contains " + r.RandNumber(1, 4) * 100 + "gp. " + Potion() + ".");//potion
            l.Add("The treasure contains " + r.RandNumber(1, 4) * 100 + "gp. " + LesserMagic() + ".");//lesser
            l.Add("The treasure contains " + r.RandNumber(1, 4) * 100 + "gp. " + LesserMagic() + ".");//lesser
            l.Add("The treasure contains " + r.RandNumber(1, 4) * 100 + "gp. " + Gem()+" "+Potion()+".");//gem and potion
            l.Add("The treasure contains " + r.RandNumber(1, 4) * 100 + "gp. " + Gem() + " " + LesserMagic() + ".");//gem and lesser
            l.Add("The treasure contains " + r.RandNumber(1, 4) * 100 + "gp. " + Potion() + " " + LesserMagic() + ".");//potion and lesser
            l.Add("The treasure contains " + r.RandNumber(1, 4) * 100 + "gp. " + Gem() + " " + Gem() + ".");//2 gems
            l.Add("The treasure contains " + r.RandNumber(1, 4) * 100 + "gp. " + LesserMagic() + " " + LesserMagic() + ".");//2 lesser
            l.Add("The treasure contains " + r.RandNumber(1, 4) * 100 + "gp. " + Potion() + " " + Potion() + ".");//potionX2
            l.Add("The treasure contains " + r.RandNumber(1, 4) * 100 + "gp. " + GreaterMagic() + ".");//greater

            int rand = r.RandNumber(1, l.Count);
            var value = l[rand];
            _amt = value.ToString();
            return _amt;
        }
Example #21
0
        public string Feet()
        {
            //roomSpread = 0;
            Randomizer r = new Randomizer();
            string _ft;

            //**************************************************************************************************************************************
            //***********************************    HERE IS WHERE YOU CAN ADJUST HOW SPREAD OUT THE MAP IS ****************************************
            //**************************************************************************************************************************************
            int ft = r.RandNumber(1, 5 + roomSpread) * 10;
            _ft = ft.ToString() + " ft.";
            return _ft;
        }
Example #22
0
        //Table 9  ==> goto table 12
        public string TreasureContainer()
        {
            //if container, optional ==> goto table 10 and/or 11
            string _tcont;
            List<string> l = new List<string>();

            l.Add("Treasure container: bags.");
            l.Add("Treasure container: sacks.");
            l.Add("Treasure container: coffers.");
            l.Add("Treasure container: chests.");
            l.Add("Treasure container: large chests.");
            l.Add("Treasure container: pottery jars.");
            l.Add("Treasure container: metal urns.");
            l.Add("Treasure container: stone containers.");
            l.Add("Treasure container: iron trunks.");
            l.Add("Treasure is loose.");

            Randomizer r = new Randomizer();
            int rand = r.RandNumber(1, l.Count);
            var value = l[rand];
            _tcont = value.ToString();
            return _tcont;
        }
Example #23
0
        //table 22 passage width
        public string PassWidth()
        {
            string _pwidth;
            List<string> l = new List<string>();

            l.Add("5 ft wide. ");
            l.Add("10 ft wide. ");
            l.Add("10 ft wide. ");
            l.Add("10 ft wide. ");
            l.Add("10 ft wide. ");
            l.Add("10 ft wide. ");
            l.Add("10 ft wide. ");
            l.Add("10 ft wide. ");
            l.Add("10 ft wide. ");
            l.Add("10 ft wide. ");
            l.Add("10 ft wide. ");
            l.Add("10 ft wide. ");
            l.Add("10 ft wide. ");
            l.Add("10 ft wide. ");
            l.Add("10 ft wide. ");
            l.Add("10 ft wide. ");
            l.Add("10 ft wide. ");
            l.Add("10 ft wide. ");
            l.Add("10 ft wide. ");
            l.Add("10 ft wide. ");
            l.Add("10 ft wide. ");
            l.Add("10 ft wide. ");
            l.Add("10 ft wide. ");
            l.Add("10 ft wide. ");
            l.Add("10 ft wide. ");
            l.Add("10 ft wide. ");
            l.Add("10 ft wide. ");
            l.Add("10 ft wide. ");
            l.Add("10 ft wide. ");
            l.Add("10 ft wide. ");
            l.Add("10 ft wide. ");
            l.Add("10 ft wide. ");
            l.Add("10 ft wide. ");
            l.Add("10 ft wide. ");
            l.Add("10 ft wide. ");
            l.Add("10 ft wide. ");
            l.Add("10 ft wide. ");
            l.Add("10 ft wide. ");
            l.Add("10 ft wide. ");
            l.Add("10 ft wide. ");
            l.Add("10 ft wide. ");
            l.Add("10 ft wide. ");
            l.Add("10 ft wide. ");
            l.Add("10 ft wide. ");
            l.Add("10 ft wide. ");
            l.Add("10 ft wide. ");
            l.Add("20 ft wide. ");
            l.Add("20 ft wide. ");
            l.Add("20 ft wide. ");
            l.Add("20 ft wide. ");
            l.Add("30 ft wide. ");
            l.Add(SpecialPassage());

            Randomizer r = new Randomizer();
            int rand = r.RandNumber(1, l.Count);

            var value = l[rand];
            _pwidth = value.ToString();
            return _pwidth;
        }
Example #24
0
        //table 23
        public string SpecialPassage()
        {
            string _turn;
            List<string> l = new List<string>();

            l.Add("40 ft wide. ");
            l.Add("40 ft wide. ");
            l.Add("40 ft wide. ");
            l.Add("40 ft wide. ");
            l.Add("40 ft wide with a row of columns.");
            l.Add("40 ft wide with a row of columns.");
            l.Add("40 ft wide with a row of columns.");

            l.Add("50 ft wide. ");
            l.Add("50 ft wide. ");
            l.Add("50 ft wide. ");
            l.Add("50 ft wide with a row of columns.");
            l.Add("50 ft wide with a row of columns.");

            l.Add("50 ft wide with a stream with a bridge. ");
            l.Add("60 ft wide with a stream with a bridge. ");
            l.Add("70 ft wide with a stream with a bridge. ");
            l.Add("50 ft wide with a stream. ");

            l.Add("70 ft wide with a river and boat on your side. ");
            l.Add("80 ft wide with a river and boat on the other side. ");
            l.Add("90 ft wide with a river and boat on your side. ");
            l.Add("80 ft wide with a river. ");

            l.Add("60 ft wide with a huge chasm 100 ft deep. ");
            l.Add("60 ft wide with a huge chasm 100 ft deep with a rope bridge. ");
            l.Add("60 ft wide with a huge chasm 100 ft deep with a narrow spot. ");

            Randomizer r = new Randomizer();
            int rand = r.RandNumber(1, l.Count);

            var value = l[rand];
            _turn = value.ToString();
            return _turn;
        }
Example #25
0
 public string SecretDoor()
 {
     Randomizer r = new Randomizer();
     int sdoor = r.RandNumber(1, 8);
     if (sdoor < 2)
     {
         return "There is a secret door located " + DoorLoc() + AfterDoor();
     }
     else return "";
 }
Example #26
0
        public string SpecialRoom()
        {
            string _special;
            List<string> l = new List<string>();

            l.Add("a " + CaveSize());
            l.Add("circular " + SpecialRoomSize());
            l.Add("circular " + SpecialRoomSize());
            l.Add("circular " + SpecialRoomSize());
            l.Add("circular " + SpecialRoomSize());
            l.Add("circular " + SpecialRoomSize());
            l.Add("hexagonal " + SpecialRoomSize());
            l.Add("hexagonal " + SpecialRoomSize());
            l.Add("octagonal " + SpecialRoomSize());
            l.Add("octagonal " + SpecialRoomSize());
            l.Add("oval " + SpecialRoomSize());
            l.Add("oval " + SpecialRoomSize());
            l.Add("oddly shaped " + SpecialRoomSize());
            l.Add("oddly shaped " + SpecialRoomSize());
            l.Add("trapezoidal " + SpecialRoomSize());
            l.Add("trapezoidal " + SpecialRoomSize());
            l.Add("trapezoidal " + SpecialRoomSize());
            l.Add("triangular " + SpecialRoomSize());
            l.Add("triangular " + SpecialRoomSize());
            l.Add("triangular " + SpecialRoomSize());

            Randomizer r = new Randomizer();
            int rand = r.RandNumber(1, l.Count);
            var value = l[rand];
            _special = value.ToString();
            return _special;
        }
Example #27
0
        public string Stairs()
        {
            string _stairs;
            List<string> l = new List<string>();

            l.Add("stairs that descend 1 level then the passage continues. ");
            l.Add("stairs that descend 1 level then the passage continues. ");
            l.Add("stairs that descend 1 level then the passage continues. ");
            l.Add("stairs that descend 1 level then the passage continues. ");
            l.Add("stairs that descend 1 level then the passage continues. ");
            l.Add("stairs that descends 2 levels then the passage continues. ");
            l.Add("stairs that descends 3 levels then the passage continues. ");
            l.Add("stairs that ascend 1 level then the passage continues. ");
            l.Add("stairs that ascend 1 level then the passage continues. ");
            l.Add("stairs that ascend to a dead end. ");
            l.Add("stairs that descend to a dead end. ");
            l.Add("stairs that descend 1 level into a room. ");
            l.Add("stairs that descend 1 level into a room. ");
            l.Add("stairs that descend 1 level into a room. ");
            l.Add("a chimney that rises up 1 level. The passage continues. ");
            l.Add("a chimney that rises up 2 levels. The passage continues. ");
            l.Add("a chimney that drops down 2 levels. The passage continues. ");
            l.Add("a trap door that drops down 1 level. The passage continues. ");
            l.Add("a trap door that drops down 1 level. The passage continues. ");
            l.Add("a trap door that drops down 2 levels. The passage continues. ");

            Randomizer r = new Randomizer();
            int rand = r.RandNumber(1, l.Count);
            var value = l[rand];
            _stairs = value.ToString();
            return _stairs;
        }
Example #28
0
        //table 11
        public string TreasureHide()
        {
            string _hide;
            List<string> l = new List<string>();

            l.Add("Treasure hidden behind a loose wall stone. ");
            l.Add("Treasure hidden behind a loose wall stone. ");
            l.Add("Treasure hidden by an Illusion to change the appearance or hide it. ");
            l.Add("Treasure hidden by an Illusion to change the appearance or hide it. ");
            l.Add("Treasure hidden by an Invisibility spell. ");
            l.Add("Treasure hidden by an Invisibility spell. ");
            l.Add("Treasure hidden by an Invisibility spell. ");
            l.Add("Treasure hidden in a nearby secret room. ");
            l.Add("Treasure hidden in a nearby secret room. ");
            l.Add("Treasure hidden in a nearby secret room. ");
            l.Add("Treasure hidden in a nearby secret room. ");
            l.Add("Treasure contained in an ordinary container in plain view. ");
            l.Add("Treasure inside or under trash or dung heap. ");
            l.Add("Treasure hidden by a non-magical disguise. ");
            l.Add("Treasure in a secret space under container. ");
            l.Add("Treasure in a secret compartment in container. ");
            l.Add("Treasure in a secret compartment in container. ");
            l.Add("Treasure under a loose flooring stone. ");
            l.Add("Treasure under a loose flooring stone. ");
            l.Add("Treasure under a loose flooring stone. ");

            Randomizer r = new Randomizer();
            int rand = r.RandNumber(1, l.Count);
            var value = l[rand];
            _hide = value.ToString();
            return _hide;
        }
Example #29
0
        //Table 19
        public string DoorLoc()
        {
            string _dloc;
            List<string> l = new List<string>();

            l.Add("to the left. ");
            l.Add("to the left. ");
            l.Add("to the left. ");
            l.Add("to the right. ");
            l.Add("to the right. ");
            l.Add("to the right. ");
            l.Add("straight ahead. ");
            l.Add("straight ahead. ");
            l.Add("straight ahead. ");
            l.Add("straight ahead. ");

            Randomizer r = new Randomizer();
            int rand = r.RandNumber(1, l.Count);
            var value = l[rand];
            _dloc = value.ToString();
            return _dloc;
        }
Example #30
0
        //table 10
        public string TreasureWards()
        {
            string _wards;
            List<string> l = new List<string>();

            l.Add("Treasure warded by: a blade scything across inside. ");
            l.Add("Treasure warded by: a blade scything across inside. ");
            l.Add("Treasure warded by: contact poison on container. ");
            l.Add("Treasure warded by: contact poison on container. ");
            l.Add("Treasure warded by: contact poison on treasure. ");
            l.Add("Treasure warded by: contact poison on treasure. ");
            l.Add("Treasure warded by: gas released by opening container. ");
            l.Add("Treasure warded by: a grenade. ");
            l.Add("Treasure warded by: poisoned needles in lock. ");
            l.Add("Treasure warded by: poisoned needles in lock. ");
            l.Add("Treasure warded by: poisoned needles in handles. ");
            l.Add("Treasure warded by: a poisonous insect or reptile living inside container. ");
            l.Add("Treasure warded by: spears released from walls when container opened. ");
            l.Add("Treasure warded by: spring darts firing from front of container. ");
            l.Add("Treasure warded by: spring darts firing from top of container. ");
            l.Add("Treasure warded by: spring darts firing up from inside bottom of container. ");
            l.Add("Treasure warded by: a stone block dropping in front of container. ");
            l.Add("Treasure warded by: a petard. ");
            l.Add("Treasure warded by: a trapdoor opening in front of container. ");
            l.Add("Treasure warded by: a trapdoor opening 6 ft in front of container. ");

            Randomizer r = new Randomizer();
            int rand = r.RandNumber(1, l.Count);
            var value = l[rand];
            _wards = value.ToString();
            return _wards;
        }