예제 #1
0
        private string GetRandomPlantNameBasedOn(PlantCategories plantCategories)
        {
            List <Plant> plants = InformationLibrary.PlantClosedSearchByCategory(plantCategories);

            Plant plant = plants[DiceRoller.RandomRangeNumber(0, plants.Count - 1)];

            return(plant.Name);
        }
예제 #2
0
 private void btnRandomNumGen_Click(object sender, EventArgs e)
 {
     tbRandomNum.Text = DiceRoller.RandomRangeNumber((int)nudRandMin.Value, (int)nudRandMax.Value).ToString();
 }
예제 #3
0
        private void SetWindStrength(bool reroll)
        {
            if (reroll)
            {
                windStrengthRoll = DiceRoller.RollD100();
            }

            if (windStrengthRoll <= 50)
            {
                windStrength = WindStrength.Light;
                if (reroll)
                {
                    windSpeed = DiceRoller.RandomRangeNumber(0, 10);
                }
                windCheckSize         = CharacterSize.None;
                windBlownAwaySize     = CharacterSize.None;
                windSkillCheckPenalty = 0;
            }
            else if (windStrengthRoll >= 51 && windStrengthRoll <= 80)
            {
                windStrength = WindStrength.Moderate;
                if (reroll)
                {
                    windSpeed = DiceRoller.RandomRangeNumber(11, 20);
                }
                windCheckSize         = CharacterSize.None;
                windBlownAwaySize     = CharacterSize.None;
                windSkillCheckPenalty = 0;
            }
            else if (windStrengthRoll >= 81 && windStrengthRoll <= 90)
            {
                windStrength = WindStrength.Strong;
                if (reroll)
                {
                    windSpeed = DiceRoller.RandomRangeNumber(21, 30);
                }
                windCheckSize         = CharacterSize.Tiny;
                windBlownAwaySize     = CharacterSize.None;
                windSkillCheckPenalty = -2;
            }
            else if (windStrengthRoll >= 91 && windStrengthRoll <= 95)
            {
                windStrength = WindStrength.Severe;
                if (reroll)
                {
                    windSpeed = DiceRoller.RandomRangeNumber(31, 50);
                }
                windCheckSize         = CharacterSize.Small;
                windBlownAwaySize     = CharacterSize.Tiny;
                windSkillCheckPenalty = -4;
            }
            else if (windStrengthRoll >= 96 && windStrengthRoll <= 100)
            {
                windStrength = WindStrength.Windstorm;
                if (reroll)
                {
                    windSpeed = DiceRoller.RandomRangeNumber(51, 300);
                }
                windCheckSize         = CharacterSize.Medium;
                windBlownAwaySize     = CharacterSize.Small;
                windSkillCheckPenalty = -8;
            }
        }