Example #1
0
        public static int RollGold(GAME game, CLASSES Class)
        {
            setGoldDice(game, Class);
            int Dice       = 4;
            int multiplier = 10;
            int Gold       = 0;

            if (game == PATHFINDER)
            {
                Dice = 6;
            }
            if (game == DND5e)
            {
                if (Class == MONK)
                {
                    multiplier = 1;
                }
            }


            for (int i = 1; i <= GoldDice; i++)
            {
                Gold += (multiplier * Rolling.RollD(Dice));
            }
            return(Gold);
        }
Example #2
0
        public static int RollHP(GAME game, CLASSES Class, int lv)
        {
            setHPDice(game, Class);

            int HP = HPDice;

            for (int i = 2; i <= lv; i++)
            {
                HP += Rolling.RollD(HPDice);
            }
            return(HP);
        }
Example #3
0
        public static RACE RollRace(GAME game)
        {
            List <string> races = collectRaces(game);
            int           count = Vars.findSize <string>(races);
            int           roll  = Rolling.RollD(count);

            //    if (frmref.DevRaceNum.Value > 0)
            //    {
            //        roll = (CLASSES)Convert.ToInt32(frmref.DevRaceNum.Value);
            //    }


            return((RACE)Convert.ToInt32(roll));
        }
Example #4
0
        public static int[] RollBackground(GAME G)
        {
            List <string> backgrounds = collectBackgrounds(G);

            int[] background = new int[6];
            background[0] = Rolling.RollD(findSize <string>(backgrounds));
            int back = background[0];

            if (background[0] == 19)
            {
                background[1] = Rolling.RollD(6); //6
            }
            else
            {
                background[1] = Rolling.RollD(8); //6
            }

            background[2] = Rolling.RollD(6); //6
            background[3] = Rolling.RollD(6); //6
            background[4] = Rolling.RollD(6); //6

            if (back == 2)
            {
                background[5] = Rolling.RollD(6);
            }
            else if ((back == 3) || (back == 7))
            {
                background[5] = Rolling.RollD(8);
            }
            else if ((back == 4) || (back == 5) || (back == 9) || (back == 10))
            {
                background[5] = Rolling.RollD(10);
            }
            else if (back == 6)
            {
                background[5] = Rolling.RollD(20);
            }
            else
            {
                background[5] = 0;
            }
            return(background);
        }
Example #5
0
        public static CLASSES RollClass(GAME game)
        {
            List <string> Classes = CollectClasses(game);
            int           count   = Vars.findSize <string>(Classes);
            int           roll    = Rolling.RollD(count);

            if (frmref.DevClassNum.Value != 0)
            {
                roll = Convert.ToInt32(frmref.DevClassNum.Value);
            }

            //    if (frmref.DevRaceNum.Value > 0)
            //    {
            //        roll = (CLASSES)Convert.ToInt32(frmref.DevRaceNum.Value);
            //    }

            CLASSES Ret = (CLASSES)Convert.ToInt32(roll);

            return(Ret);
        }