Exemple #1
0
        private int DetermineManipulators()
        {
            var manipulators = 0;
            var dice = new Dice();
            var roll = dice.Rng(2, 6);
            if (LimbSegments == 1)
            {
                roll -= 1;
            }
            if (LimbSegments > 4 && LimbSegments <= 6)
            {
                roll += 1;
            }
            if (LimbSegments > 6)
            {
                roll += 2;
            }
            if (PrimaryLocomotion == Locomotions.Wingedflight || SecondaryLocomotion == Locomotions.Wingedflight)
            {
                roll -= 1;
            }
            if (PrimaryLocomotion == Locomotions.Swimming && WaterHabitat == WaterHabitats.OpenOcean)
            {
                roll -= 2;
            }
            if (TrophicDiet == TrophicDiets.GatheringHerbivore)
            {
                roll += 1;
            }

            if (roll <= 6)
            {
                manipulators = 0;
            }

            switch (roll)
            {
                case 7:
                case 8:
                case 9:
                    manipulators = 1;
                    break;
                case 10:
                    manipulators = 2;
                    break;
                case 11:
                case 12:
                case 13:
                case 14:
                case 15:
                case 16:
                case 17:
                    var d1 = new Dice();
                    manipulators = d1.Rng(6);
                    break;
            }
            return manipulators;
        }
Exemple #2
0
        /// <summary>
        ///     Determines RVM, and geologic values for a satelite
        /// </summary>
        /// <param name="s">The satelite</param>
        /// <param name="ourBag">Ddice object</param>
        /// <param name="sysAge">System Age</param>
        /// <param name="isGasGiantMoon">Is this a moon of a gas giant?</param>
        private static void DetermineGeologicValues( Satellite s, Dice ourBag, double sysAge, bool isGasGiantMoon )
        {
            //volcanic set first.
            var addVal = s.Gravity / sysAge * 40;

            if (s.MajorMoons.Count == 1)
            {
                addVal = addVal + 5;
            }
            if (s.MajorMoons.Count == 2)
            {
                addVal = addVal + 10;
            }

            if (s.SatelliteType == Satellite.SubtypeSulfur)
            {
                addVal = addVal + 60;
            }
            if (isGasGiantMoon)
            {
                addVal = addVal + 5;
            }

            var roll = ourBag.GurpsRoll();

            addVal = addVal + roll;

            if (addVal <= 16.5)
            {
                s.VolActivity = Satellite.GeologicNone;
            }
            if (addVal > 16.5 && addVal <= 20.5)
            {
                s.VolActivity = Satellite.GeologicLight;
            }
            if (addVal > 20.5 && addVal <= 26.5)
            {
                s.VolActivity = Satellite.GeologicModerate;
            }
            if (addVal > 26.5 && addVal <= 70.5)
            {
                s.VolActivity = Satellite.GeologicHeavy;
            }
            if (addVal > 70.5)
            {
                s.VolActivity = Satellite.GeologicExtreme;
            }

            roll = ourBag.GurpsRoll();
            if (s.VolActivity == Satellite.GeologicHeavy && s.SatelliteType == Satellite.SubtypeGarden && roll <= 8)
            {
                roll = ourBag.Rng(6);
                if (roll <= 3)
                {
                    s.AddAtmCategory(Satellite.AtmMargPollutants);
                }
                if (roll >= 4)
                {
                    s.AddAtmCategory(Satellite.AtmMargSulfur);
                }
            }

            roll = ourBag.GurpsRoll();
            if (s.VolActivity == Satellite.GeologicExtreme && s.SatelliteType == Satellite.SubtypeGarden && roll <= 14)
            {
                roll = ourBag.Rng(6);
                if (roll <= 3)
                {
                    s.AddAtmCategory(Satellite.AtmMargPollutants);
                }
                if (roll >= 4)
                {
                    s.AddAtmCategory(Satellite.AtmMargSulfur);
                }
            }

            //tectonic next
            roll = ourBag.GurpsRoll();

            //negative mods
            if (Math.Abs(s.HydCoverage) < 0)
            {
                roll = roll - 4;
            }
            if (s.HydCoverage > 0 && s.HydCoverage < .5)
            {
                roll = roll - 2;
            }
            if (s.VolActivity == Satellite.GeologicNone)
            {
                roll = roll - 8;
            }
            if (s.VolActivity == Satellite.GeologicLight)
            {
                roll = roll - 4;
            }

            //postive mods
            if (s.VolActivity == Satellite.GeologicHeavy)
            {
                roll = roll + 4;
            }
            if (s.VolActivity == Satellite.GeologicExtreme)
            {
                roll = roll + 8;
            }
            if (s.MajorMoons.Count == 1)
            {
                roll = roll + 2;
            }
            if (s.MajorMoons.Count > 1)
            {
                roll = roll + 4;
            }

            //nullers.
            if (s.SatelliteSize == Satellite.SizeTiny)
            {
                roll = 0;
            }
            if (s.SatelliteSize == Satellite.SizeSmall)
            {
                roll = 0;
            }

            if (roll <= 6.5)
            {
                s.TecActivity = Satellite.GeologicNone;
            }
            if (roll > 6.5 && roll <= 10.5)
            {
                s.TecActivity = Satellite.GeologicLight;
            }
            if (roll > 10.5 && roll <= 14.5)
            {
                s.TecActivity = Satellite.GeologicModerate;
            }
            if (roll > 14.5 && roll <= 18.5)
            {
                s.TecActivity = Satellite.GeologicHeavy;
            }
            if (roll > 18.5)
            {
                s.TecActivity = Satellite.GeologicExtreme;
            }

            //update RVM
            if ((bool) !OptionCont.HighRvmVal)
            {
                roll = ourBag.GurpsRoll();
            }
            if (OptionCont.HighRvmVal != null && (bool) OptionCont.HighRvmVal)
            {
                roll = ourBag.Rng(1, 6, 10);
            }

            if (s.VolActivity == Satellite.GeologicNone)
            {
                roll = roll - 2;
            }
            if (s.VolActivity == Satellite.GeologicLight)
            {
                roll = roll - 1;
            }
            if (s.VolActivity == Satellite.GeologicHeavy)
            {
                roll = roll + 1;
            }
            if (s.VolActivity == Satellite.GeologicExtreme)
            {
                roll = roll + 2;
            }

            if (s.BaseType == Satellite.BasetypeAsteroidbelt)
            {
                if (s.SatelliteSize == Satellite.SizeTiny)
                {
                    roll = roll - 1;
                }
                if (s.SatelliteSize == Satellite.SizeMedium)
                {
                    roll = roll + 2;
                }
                if (s.SatelliteSize == Satellite.SizeLarge)
                {
                    roll = roll + 4;
                }
            }

            //set stable activity here:
            if (OptionCont.StableActivity != null && ( (bool) OptionCont.StableActivity && s.SatelliteSize >= Satellite.SizeSmall && ( s.BaseType == Satellite.BasetypeMoon || s.BaseType == Satellite.BasetypeTerrestial ) ))
            {
                s.VolActivity = Satellite.GeologicModerate;
                s.TecActivity = Satellite.GeologicModerate;
            }

            s.PopulateRvm(roll);
        }
Exemple #3
0
        /// <summary>
        ///     This function generates a random age per GURPS Space 4e rules.
        /// </summary>
        /// <param name="ourDice">The Ddice this rolls</param>
        /// <returns>The system age</returns>
        public static double GenSystemAge( Dice ourDice )
        {
            //get first roll
            var roll = ourDice.GurpsRoll();

            if (OptionCont.GetSystemAge() != -1)
            {
                return OptionCont.GetSystemAge();
            }

            if (roll == 3)
            {
                return 0.01;
            }
            if (roll >= 4 && roll <= 6)
            {
                return .1 + ourDice.Rng(1, 6, -1) * .3 + ourDice.Rng(1, 6, -1) * .05;
            }
            if (roll >= 7 && roll <= 10)
            {
                return 2 + ourDice.Rng(1, 6, -1) * .6 + ourDice.Rng(1, 6, -1) * .1;
            }
            if (roll >= 11 && roll <= 14)
            {
                return 5.6 + ourDice.Rng(1, 6, -1) * .6 + ourDice.Rng(1, 6, -1) * .1;
            }
            if (roll >= 15 && roll <= 17)
            {
                return 8 + ourDice.Rng(1, 6, -1) * .6 + ourDice.Rng(1, 6, -1) * .1;
            }
            if (roll == 18)
            {
                return 10 + ourDice.Rng(1, 6, -1) * .6 + ourDice.Rng(1, 6, -1) * .1;
            }

            return 13.8;
        }
Exemple #4
0
 private Touches DetermineTouch()
 {
     var touch = Touches.None;
     var dice = new Dice();
     var roll = dice.Rng(2, 6);
     if (PrimarySense == PrimarySenses.TouchTaste)
     {
         roll += 4;
     }
     if (Skeleton == Skeletons.External)
     {
         roll -= 2;
     }
     if (LandOrWater == LandWater.Water)
     {
         roll += 2;
     }
     if (PrimaryLocomotion == Locomotions.Digging || SecondaryLocomotion == Locomotions.Digging)
     {
         roll += 2;
     }
     if (PrimaryLocomotion == Locomotions.Wingedflight || SecondaryLocomotion == Locomotions.Wingedflight)
     {
         roll -= 2;
     }
     if (Vision == Visions.Blindness || Vision == Visions.BlindnessSoft)
     {
         roll += 2;
     }
     if (TrophicDiet == TrophicDiets.TrappingCarnivore)
     {
         roll += 1;
     }
     if (SizeClass == SizeClasses.Small)
     {
         roll += 1;
     }
     if (roll <= 2)
     {
         touch = Touches.Numb;
     }
     switch (roll)
     {
         case 3:
         case 4:
             touch = Touches.Minus2PoorSense;
             break;
         case 5:
         case 6:
             touch = Touches.Minus1PoorSense;
             break;
         case 7:
         case 8:
             touch = Touches.Normal;
             break;
         case 9:
         case 10:
             touch = Touches.Acute;
             break;
         case 11:
         case 12:
         case 13:
         case 14:
         case 15:
         case 16:
         case 17:
         case 18:
             touch = Touches.AcutePlusSensitive;
             break;
     }
     return touch;
 }
Exemple #5
0
        public static string SetColor( Dice ourDice, double effTemp )
        {
            if ((bool) !OptionCont.FantasyColors)
            {
                if (effTemp >= 33000)
                {
                    return "Blue";
                }
                if (effTemp >= 10000 && effTemp < 33000)
                {
                    return "Blue-White";
                }
                if (effTemp >= 7500 && effTemp < 10000)
                {
                    return "Whitish Blue";
                }
                if (effTemp >= 6000 && effTemp < 7500)
                {
                    return "White";
                }
                if (effTemp >= 5200 && effTemp < 6000)
                {
                    return "Yellow";
                }
                if (effTemp >= 4250 && effTemp < 5200)
                {
                    return "Yellowish Orange";
                }
                if (effTemp >= 3700 && effTemp < 4250)
                {
                    return "Orange";
                }
                if (effTemp >= 2000 && effTemp < 3700)
                {
                    return "Orangish Red";
                }
                if (effTemp >= 1300 && effTemp < 2000)
                {
                    return "Red";
                }
                if (effTemp >= 700 && effTemp < 1300)
                {
                    return "Purplish Red";
                }
                if (effTemp >= 100 && effTemp < 700)
                {
                    return "Brown";
                }
                if (effTemp < 100)
                {
                    return "Black";
                }
            }
            else
            {
                var roll = ourDice.Rng(100019);
                if (LibStarGen.Inbetween(roll, 0, 10))
                {
                    return "Black";
                }
                if (LibStarGen.Inbetween(roll, 11, 531))
                {
                    return "Green";
                }
                if (LibStarGen.Inbetween(roll, 532, 952))
                {
                    return "Yellow-Green";
                }
                if (LibStarGen.Inbetween(roll, 953, 6057))
                {
                    return "Red-Orange";
                }
                if (LibStarGen.Inbetween(roll, 6058, 6835))
                {
                    return "Blue";
                }
                if (LibStarGen.Inbetween(roll, 6836, 11940))
                {
                    return "Purple-Red";
                }
                if (LibStarGen.Inbetween(roll, 11941, 23948))
                {
                    return "Red";
                }
                if (LibStarGen.Inbetween(roll, 23949, 49960))
                {
                    return "Yellow";
                }
                if (LibStarGen.Inbetween(roll, 49961, 75972))
                {
                    return "Orange";
                }
                if (LibStarGen.Inbetween(roll, 75973, 87980))
                {
                    return "Yellow-Orange";
                }
                if (LibStarGen.Inbetween(roll, 87981, 93085))
                {
                    return "Blue-White";
                }
                if (LibStarGen.Inbetween(roll, 93086, 93763))
                {
                    return "White";
                }
                if (LibStarGen.Inbetween(roll, 93764, 98868))
                {
                    return "White-Blue";
                }
                if (LibStarGen.Inbetween(roll, 98869, 99289))
                {
                    return "Green-Blue";
                }
                if (LibStarGen.Inbetween(roll, 99290, 99710))
                {
                    return "Blue-Violet";
                }
                if (LibStarGen.Inbetween(roll, 99711, 100019))
                {
                    return "Purple";
                }
            }

            return "ERROR";
        }
Exemple #6
0
        private Symmetries DetermineSymmetry()
        {
            var symmetry = Symmetries.None;
            var dice = new Dice();
            var roll = dice.Rng(2, 6);

            if (PrimaryLocomotion == Locomotions.Immobile || SecondaryLocomotion == Locomotions.Immobile)
            {
                roll += 1;
            }

            if (PrimaryLocomotion == Locomotions.Floating || SecondaryLocomotion == Locomotions.Floating)
            {
                roll += 1;
            }

            switch (roll)
            {
                case 2:
                case 3:
                case 4:
                case 5:
                case 6:
                case 7:
                    symmetry = Symmetries.Bilateral;
                    break;
                case 8:
                    symmetry = Symmetries.Trilateral;
                    break;
                case 9:
                    symmetry = Symmetries.Radial;
                    break;
                case 10:
                    symmetry = Symmetries.Spherical;
                    break;
                case 11:
                case 12:
                case 13:
                case 14:
                    symmetry = Symmetries.Asymmetric;
                    break;
            }
            return symmetry;
        }
Exemple #7
0
 private TasteSmells DetermineTasteSmell()
 {
     var tastesmell = TasteSmells.None;
     var dice = new Dice();
     var roll = dice.Rng(2, 6) + 2;
     if (PrimarySense == PrimarySenses.TouchTaste)
     {
         roll += 4;
     }
     if (TrophicDiet == TrophicDiets.ChasingCarnivore || TrophicDiet == TrophicDiets.GatheringHerbivore)
     {
         roll += 2;
     }
     if (TrophicDiet == TrophicDiets.FilterFeeder || TrophicDiet == TrophicDiets.TrappingCarnivore || TrophicDiet == TrophicDiets.AutothrophPhotosynthetic || TrophicDiet == TrophicDiets.AutothrophChemosynthetic ||
         TrophicDiet == TrophicDiets.AutothrophOther)
     {
         roll -= 2;
     }
     if (PrimaryLocomotion == Locomotions.Immobile || SecondaryLocomotion == Locomotions.Immobile)
     {
         roll -= 4;
     }
     if (roll <= 3)
     {
         tastesmell = TasteSmells.NoTasteSmell;
     }
     switch (roll)
     {
         case 4:
         case 5:
             tastesmell = TasteSmells.NoSmell;
             break;
         case 6:
         case 7:
         case 8:
             tastesmell = TasteSmells.Normal;
             break;
         case 9:
         case 10:
             tastesmell = TasteSmells.Acute;
             break;
         case 11:
         case 12:
         case 13:
         case 14:
         case 15:
         case 16:
             tastesmell = TasteSmells.AcutePlusDisciminatory;
             break;
     }
     return tastesmell;
 }
Exemple #8
0
        private Sexes DetermineSexes()
        {
            var sexes = Sexes.None;
            var dice = new Dice();
            var roll = dice.Rng(2, 6);
            if (PrimaryLocomotion == Locomotions.Immobile || SecondaryLocomotion == Locomotions.Immobile)
            {
                roll -= 1;
            }
            if (Symmetry == Symmetries.Asymmetric)
            {
                roll -= 1;
            }
            if (TrophicDiet == TrophicDiets.AutothrophPhotosynthetic || TrophicDiet == TrophicDiets.AutothrophChemosynthetic || TrophicDiet == TrophicDiets.AutothrophOther)
            {
                roll -= 1;
            }

            if (roll <= 4)
            {
                sexes = Sexes.Asexual;
            }

            switch (roll)
            {
                case 5:
                case 6:
                    sexes = Sexes.Hermaphrodite;
                    break;
                case 7:
                case 8:
                case 9:
                    sexes = Sexes.TwoSexes;
                    break;
                case 10:
                    sexes = Sexes.Switching;
                    break;
                case 11:
                    sexes = Sexes.ThreeOrMore;
                    break;
                case 12:
                    sexes = Sexes.Alternating;
                    break;
            }
            return sexes;
        }
Exemple #9
0
 private int DetermineSides()
 {
     var sides = 0;
     var dice = new Dice();
     var roll = dice.Rng(6);
     if (Symmetry == Symmetries.Bilateral)
     {
         sides = 2;
     }
     if (Symmetry == Symmetries.Trilateral)
     {
         sides = 3;
     }
     if (Symmetry == Symmetries.Radial)
     {
         sides = roll + 3;
     }
     if (Symmetry == Symmetries.Spherical)
     {
         switch (roll)
         {
             case 1:
                 sides = 4;
                 break;
             case 2:
             case 3:
                 sides = 6;
                 break;
             case 4:
                 sides = 8;
                 break;
             case 5:
                 sides = 12;
                 break;
             case 6:
                 sides = 20;
                 break;
         }
     }
     return sides;
 }
Exemple #10
0
        private PrimarySenses DeterminePrimarySense()
        {
            var primarysense = PrimarySenses.None;
            var dice = new Dice();
            var roll = dice.Rng(3, 6);

            if (LandOrWater == LandWater.Water)
            {
                roll -= 2;
            }

            if (TrophicDiet == TrophicDiets.AutothrophPhotosynthetic || TrophicDiet == TrophicDiets.AutothrophChemosynthetic || TrophicDiet == TrophicDiets.AutothrophOther)
            {
                roll += 2;
            }

            if (roll >= 1 && roll <= 7)
            {
                primarysense = PrimarySenses.Hearing;
            }
            if (roll >= 8 && roll <= 12)
            {
                primarysense = PrimarySenses.Vision;
            }
            if (roll >= 13 && roll <= 20)
            {
                primarysense = PrimarySenses.TouchTaste;
            }
            return primarysense;
        }
Exemple #11
0
 private Locomotions DetermineSecondaryLocomotion()
 {
     var secondaryLocomotion = Locomotions.None;
     var dice = new Dice();
     var roll = dice.Rng(2, 6);
     if (PrimaryLocomotion == Locomotions.Climbing)
     {
         switch (roll)
         {
             case 2:
             case 3:
             case 4:
             case 5:
             case 6:
                 secondaryLocomotion = Locomotions.Slithering;
                 break;
             case 7:
             case 8:
             case 9:
             case 10:
             case 11:
                 secondaryLocomotion = Locomotions.Walking;
                 break;
             case 12:
                 secondaryLocomotion = Locomotions.None;
                 break;
         }
     }
     if (PrimaryLocomotion == Locomotions.Digging)
     {
         if (LandOrWater == LandWater.Land)
         {
             switch (roll)
             {
                 case 2:
                 case 3:
                 case 4:
                 case 5:
                 case 6:
                     secondaryLocomotion = Locomotions.Slithering;
                     break;
                 case 7:
                 case 8:
                 case 9:
                 case 10:
                 case 11:
                     secondaryLocomotion = Locomotions.Walking;
                     break;
                 case 12:
                     secondaryLocomotion = Locomotions.None;
                     break;
             }
         }
         if (LandOrWater == LandWater.Water)
         {
             switch (roll)
             {
                 case 2:
                 case 3:
                 case 4:
                 case 5:
                     secondaryLocomotion = Locomotions.Slithering;
                     break;
                 case 6:
                 case 7:
                     secondaryLocomotion = Locomotions.Walking;
                     break;
                 case 8:
                 case 9:
                 case 10:
                 case 11:
                     secondaryLocomotion = Locomotions.Swimming;
                     break;
                 case 12:
                     secondaryLocomotion = Locomotions.None;
                     break;
             }
         }
     }
     if (PrimaryLocomotion == Locomotions.Slithering)
     {
         switch (roll)
         {
             case 2:
             case 3:
             case 4:
             case 5:
             case 6:
             case 7:
             case 8:
             case 9:
             case 10:
                 secondaryLocomotion = Locomotions.Swimming;
                 break;
             case 11:
             case 12:
                 secondaryLocomotion = Locomotions.None;
                 break;
         }
     }
     if (PrimaryLocomotion == Locomotions.Walking)
     {
         switch (roll)
         {
             case 2:
             case 3:
             case 4:
             case 5:
             case 6:
             case 7:
             case 8:
                 secondaryLocomotion = Locomotions.Swimming;
                 break;
             case 9:
             case 10:
             case 11:
             case 12:
                 secondaryLocomotion = Locomotions.None;
                 break;
         }
     }
     if (PrimaryLocomotion == Locomotions.Wingedflight)
     {
         switch (roll)
         {
             case 2:
             case 3:
             case 4:
             case 5:
                 secondaryLocomotion = Locomotions.Climbing;
                 break;
             case 6:
             case 7:
                 secondaryLocomotion = Locomotions.Swimming;
                 break;
             case 8:
             case 9:
             case 10:
                 secondaryLocomotion = Locomotions.Walking;
                 break;
             case 11:
                 secondaryLocomotion = Locomotions.Slithering;
                 break;
             case 12:
                 secondaryLocomotion = Locomotions.None;
                 break;
         }
     }
     return secondaryLocomotion;
 }
Exemple #12
0
 private Locomotions DeterminePrimaryLocomotion()
 {
     var primaryLocomotion = Locomotions.None;
     var dice = new Dice();
     var roll = dice.Rng(2, 6);
     if (TrophicDiet == TrophicDiets.PouncingCarnivore || TrophicDiet == TrophicDiets.ChasingCarnivore || TrophicDiet == TrophicDiets.Omnivore || TrophicDiet == TrophicDiets.GatheringHerbivore || TrophicDiet == TrophicDiets.Scavenger)
     {
         roll += 1;
     }
     if (LandHabitat == LandHabitats.Arctic)
     {
         switch (roll)
         {
             case 2:
                 primaryLocomotion = Locomotions.Immobile;
                 break;
             case 3:
             case 4:
                 primaryLocomotion = Locomotions.Slithering;
                 break;
             case 5:
             case 6:
                 primaryLocomotion = Locomotions.Swimming;
                 HasSecondaryLocomotion = true;
                 break;
             case 7:
                 primaryLocomotion = Locomotions.Digging;
                 HasSecondaryLocomotion = true;
                 break;
             case 8:
             case 9:
                 primaryLocomotion = Locomotions.Walking;
                 break;
             case 10:
             case 11:
                 primaryLocomotion = Locomotions.Wingedflight;
                 HasSecondaryLocomotion = true;
                 break;
             case 12:
             case 13:
                 primaryLocomotion = Locomotions.Special;
                 break;
         }
     }
     if (WaterHabitat == WaterHabitats.Banks || WaterHabitat == WaterHabitats.OpenOcean)
     {
         switch (roll)
         {
             case 2:
             case 3:
                 primaryLocomotion = Locomotions.Immobile;
                 break;
             case 4:
                 primaryLocomotion = Locomotions.Floating;
                 break;
             case 5:
                 primaryLocomotion = Locomotions.Sailing;
                 break;
             case 6:
             case 7:
             case 8:
                 primaryLocomotion = Locomotions.Swimming;
                 break;
             case 9:
             case 10:
             case 11:
                 primaryLocomotion = Locomotions.Wingedflight;
                 HasSecondaryLocomotion = true;
                 break;
             case 12:
             case 13:
                 primaryLocomotion = Locomotions.Special;
                 break;
         }
     }
     if (WaterHabitat == WaterHabitats.DeepOceanVents || WaterHabitat == WaterHabitats.Reef)
     {
         switch (roll)
         {
             case 2:
             case 3:
             case 4:
             case 5:
                 primaryLocomotion = Locomotions.Immobile;
                 break;
             case 6:
                 primaryLocomotion = Locomotions.Floating;
                 break;
             case 7:
                 primaryLocomotion = Locomotions.Digging;
                 HasSecondaryLocomotion = true;
                 break;
             case 8:
             case 9:
                 primaryLocomotion = Locomotions.Walking;
                 HasSecondaryLocomotion = true;
                 break;
             case 10:
             case 11:
             case 12:
             case 13:
                 primaryLocomotion = Locomotions.Swimming;
                 break;
         }
     }
     if (LandHabitat == LandHabitats.Desert)
     {
         switch (roll)
         {
             case 2:
                 primaryLocomotion = Locomotions.Immobile;
                 break;
             case 3:
             case 4:
                 primaryLocomotion = Locomotions.Slithering;
                 break;
             case 5:
                 primaryLocomotion = Locomotions.Digging;
                 HasSecondaryLocomotion = true;
                 break;
             case 6:
             case 7:
             case 8:
                 primaryLocomotion = Locomotions.Walking;
                 break;
             case 9:
             case 10:
             case 11:
                 primaryLocomotion = Locomotions.Wingedflight;
                 HasSecondaryLocomotion = true;
                 break;
             case 12:
             case 13:
                 primaryLocomotion = Locomotions.Special;
                 break;
         }
     }
     if (LandHabitat == LandHabitats.IslandBeach)
     {
         switch (roll)
         {
             case 2:
                 primaryLocomotion = Locomotions.Immobile;
                 break;
             case 3:
             case 4:
                 primaryLocomotion = Locomotions.Slithering;
                 break;
             case 5:
                 primaryLocomotion = Locomotions.Digging;
                 HasSecondaryLocomotion = true;
                 break;
             case 6:
             case 7:
                 primaryLocomotion = Locomotions.Walking;
                 break;
             case 8:
                 primaryLocomotion = Locomotions.Climbing;
                 HasSecondaryLocomotion = true;
                 break;
             case 9:
                 primaryLocomotion = Locomotions.Swimming;
                 HasSecondaryLocomotion = true;
                 break;
             case 10:
             case 11:
                 primaryLocomotion = Locomotions.Wingedflight;
                 HasSecondaryLocomotion = true;
                 break;
             case 12:
             case 13:
                 primaryLocomotion = Locomotions.Special;
                 break;
         }
     }
     if (WaterHabitat == WaterHabitats.TropicalLagoon)
     {
         switch (roll)
         {
             case 2:
             case 3:
             case 4:
                 primaryLocomotion = Locomotions.Immobile;
                 break;
             case 5:
                 primaryLocomotion = Locomotions.Floating;
                 break;
             case 6:
                 primaryLocomotion = Locomotions.Slithering;
                 HasSecondaryLocomotion = true;
                 break;
             case 7:
                 primaryLocomotion = Locomotions.Walking;
                 HasSecondaryLocomotion = true;
                 break;
             case 8:
                 primaryLocomotion = Locomotions.Digging;
                 HasSecondaryLocomotion = true;
                 break;
             case 9:
                 primaryLocomotion = Locomotions.Swimming;
                 break;
             case 10:
             case 11:
                 primaryLocomotion = Locomotions.Wingedflight;
                 break;
             case 12:
             case 13:
                 primaryLocomotion = Locomotions.Special;
                 break;
         }
     }
     if (WaterHabitat == WaterHabitats.SaltWaterSea || WaterHabitat == WaterHabitats.FreshWaterLakes)
     {
         switch (roll)
         {
             case 2:
             case 3:
                 primaryLocomotion = Locomotions.Immobile;
                 break;
             case 4:
                 primaryLocomotion = Locomotions.Floating;
                 break;
             case 5:
                 primaryLocomotion = Locomotions.Walking;
                 HasSecondaryLocomotion = true;
                 break;
             case 6:
                 primaryLocomotion = Locomotions.Slithering;
                 HasSecondaryLocomotion = true;
                 break;
             case 7:
             case 8:
             case 9:
                 primaryLocomotion = Locomotions.Swimming;
                 break;
             case 10:
             case 11:
                 primaryLocomotion = Locomotions.Wingedflight;
                 HasSecondaryLocomotion = true;
                 break;
             case 12:
             case 13:
                 primaryLocomotion = Locomotions.Special;
                 break;
         }
     }
     if (LandHabitat == LandHabitats.Mountain)
     {
         switch (roll)
         {
             case 2:
                 primaryLocomotion = Locomotions.Immobile;
                 break;
             case 3:
             case 4:
                 primaryLocomotion = Locomotions.Slithering;
                 break;
             case 5:
                 primaryLocomotion = Locomotions.Digging;
                 HasSecondaryLocomotion = true;
                 break;
             case 6:
             case 7:
                 primaryLocomotion = Locomotions.Walking;
                 HasSecondaryLocomotion = true;
                 break;
             case 8:
                 primaryLocomotion = Locomotions.Climbing;
                 HasSecondaryLocomotion = true;
                 break;
             case 9:
             case 10:
             case 11:
                 primaryLocomotion = Locomotions.Wingedflight;
                 HasSecondaryLocomotion = true;
                 break;
             case 12:
             case 13:
                 primaryLocomotion = Locomotions.Special;
                 break;
         }
     }
     if (LandHabitat == LandHabitats.Plains)
     {
         switch (roll)
         {
             case 2:
                 primaryLocomotion = Locomotions.Immobile;
                 break;
             case 3:
             case 4:
                 primaryLocomotion = Locomotions.Slithering;
                 break;
             case 5:
                 primaryLocomotion = Locomotions.Digging;
                 HasSecondaryLocomotion = true;
                 break;
             case 6:
             case 7:
             case 8:
                 primaryLocomotion = Locomotions.Walking;
                 break;
             case 9:
             case 10:
             case 11:
                 primaryLocomotion = Locomotions.Wingedflight;
                 HasSecondaryLocomotion = true;
                 break;
             case 12:
             case 13:
                 primaryLocomotion = Locomotions.Special;
                 break;
         }
     }
     if (WaterHabitat == WaterHabitats.RiverStream)
     {
         switch (roll)
         {
             case 2:
             case 3:
                 primaryLocomotion = Locomotions.Immobile;
                 break;
             case 4:
                 primaryLocomotion = Locomotions.Floating;
                 break;
             case 5:
                 primaryLocomotion = Locomotions.Slithering;
                 HasSecondaryLocomotion = true;
                 break;
             case 6:
                 primaryLocomotion = Locomotions.Digging;
                 HasSecondaryLocomotion = true;
                 break;
             case 7:
                 primaryLocomotion = Locomotions.Walking;
                 HasSecondaryLocomotion = true;
                 break;
             case 8:
             case 9:
                 primaryLocomotion = Locomotions.Swimming;
                 break;
             case 10:
             case 11:
                 primaryLocomotion = Locomotions.Wingedflight;
                 HasSecondaryLocomotion = true;
                 break;
             case 12:
             case 13:
                 primaryLocomotion = Locomotions.Special;
                 break;
         }
     }
     if (LandHabitat == LandHabitats.Swampland)
     {
         switch (roll)
         {
             case 2:
                 primaryLocomotion = Locomotions.Immobile;
                 break;
             case 3:
             case 4:
             case 5:
                 primaryLocomotion = Locomotions.Swimming;
                 HasSecondaryLocomotion = true;
                 break;
             case 6:
                 primaryLocomotion = Locomotions.Slithering;
                 break;
             case 7:
                 primaryLocomotion = Locomotions.Digging;
                 HasSecondaryLocomotion = true;
                 break;
             case 8:
                 primaryLocomotion = Locomotions.Walking;
                 break;
             case 9:
                 primaryLocomotion = Locomotions.Climbing;
                 HasSecondaryLocomotion = true;
                 break;
             case 10:
             case 11:
                 primaryLocomotion = Locomotions.Wingedflight;
                 HasSecondaryLocomotion = true;
                 break;
             case 12:
             case 13:
                 primaryLocomotion = Locomotions.Special;
                 break;
         }
     }
     if (LandHabitat == LandHabitats.Woodlands || LandHabitat == LandHabitats.Jungle)
     {
         switch (roll)
         {
             case 2:
                 primaryLocomotion = Locomotions.Immobile;
                 break;
             case 3:
             case 4:
                 primaryLocomotion = Locomotions.Slithering;
                 break;
             case 5:
                 primaryLocomotion = Locomotions.Digging;
                 HasSecondaryLocomotion = true;
                 break;
             case 6:
             case 7:
                 primaryLocomotion = Locomotions.Walking;
                 break;
             case 8:
             case 9:
                 primaryLocomotion = Locomotions.Climbing;
                 HasSecondaryLocomotion = true;
                 break;
             case 10:
             case 11:
                 primaryLocomotion = Locomotions.Wingedflight;
                 HasSecondaryLocomotion = true;
                 break;
             case 12:
             case 13:
                 primaryLocomotion = Locomotions.Special;
                 break;
         }
     }
     return primaryLocomotion;
 }
Exemple #13
0
 private Playfulnessess DeterminePlayfulness()
 {
     var playfulness = Playfulnessess.None;
     var dice = new Dice();
     var roll1 = dice.Rng(6);
     var roll2 = dice.Rng(6);
     var roll = roll1 - roll2;
     if (Strategy == Strategies.ModerateK)
     {
         roll += 1;
     }
     if (Strategy == Strategies.StrongK)
     {
         roll += 2;
     }
     if (IntelligenceValue >= 2)
     {
         roll += 1;
     }
     if (SocialOrganization == SocialOrganizations.Solitary)
     {
         roll -= 1;
     }
     //TODO
     //PSEUDOCODE
     //if (Advantages == "Cannot Learn")
     //{
     //    roll -= 3;
     //}
     if (roll >= 3)
     {
         playfulness = Playfulnessess.ExtremeCompulsivePlayfulness;
     }
     if (roll <= -3)
     {
         playfulness = Playfulnessess.NoSenseofHumor;
     }
     switch (roll)
     {
         case 2:
             playfulness = Playfulnessess.CompulsivePlayfulness;
             break;
         case 1:
             playfulness = Playfulnessess.Playful;
             //TODO add playful quirk
             break;
         case 0:
             playfulness = Playfulnessess.Normal;
             break;
         case -1:
             playfulness = Playfulnessess.Serious;
             //TODO add Serious quirk
             break;
         case -2:
             playfulness = Playfulnessess.OdiousRacialHabit;
             //TODO add Wet Blanket
             break;
     }
     return playfulness;
 }
Exemple #14
0
        private MatingBehaviours DetermineMatingBehaviour()
        {
            var matingbehaviour = MatingBehaviours.None;
            var dice = new Dice();
            var roll = dice.Rng(2, 6);
            if (Sex == Sexes.Hermaphrodite)
            {
                roll -= 2;
            }
            if (Gestation == Gestations.SpawningPollinating)
            {
                roll -= 1;
            }
            if (Gestation == Gestations.LiveBearing || Gestation == Gestations.LiveBearingWithPouch)
            {
                roll += 1;
            }
            if (Strategy == Strategies.StrongR)
            {
                roll -= 1;
            }
            if (Strategy == Strategies.StrongK)
            {
                roll += 1;
            }

            if (roll <= 5)
            {
                matingbehaviour = MatingBehaviours.NoPair;
            }

            switch (roll)
            {
                case 6:
                case 7:
                    matingbehaviour = MatingBehaviours.TempPair;
                    break;
                case 8:
                    matingbehaviour = MatingBehaviours.PermanentPair;
                    break;
                case 9:
                case 10:
                    matingbehaviour = MatingBehaviours.Harem;
                    break;
                case 11:
                case 12:
                case 13:
                case 14:
                    matingbehaviour = MatingBehaviours.Hive;
                    break;
            }

            return matingbehaviour;
        }
Exemple #15
0
        private Strategies DetermineStrategy()
        {
            var strategy = Strategies.None;
            var dice = new Dice();
            var roll = dice.Rng(2, 6);

            if (SizeClass == SizeClasses.Large)
            {
                roll -= 2;
            }
            if (SizeClass == SizeClasses.Small)
            {
                roll += 1;
            }
            if (Gestation == Gestations.SpawningPollinating)
            {
                roll += 2;
            }

            if (roll <= 4)
            {
                strategy = Strategies.StrongK;
                OffspringCount = 1;
            }

            switch (roll)
            {
                case 5:
                case 6:
                    strategy = Strategies.ModerateK;
                    OffspringCount = 1;
                    break;
                case 7:
                    var d2 = new Dice();
                    var spawn = d2.Rng(6);
                    strategy = Strategies.MedianStrategy;
                    OffspringCount = spawn;
                    break;
                case 8:
                case 9:
                    var d3 = new Dice();
                    var spawn3 = d3.Rng(6) + 1;
                    strategy = Strategies.ModerateR;
                    OffspringCount = spawn3;
                    break;
                case 10:
                case 11:
                case 12:
                case 13:
                case 14:
                case 15:
                case 16:
                    var d4 = new Dice();
                    var spawn4 = d4.Rng(2, 6);
                    strategy = Strategies.StrongR;
                    OffspringCount = spawn4;
                    break;
            }

            if (Gestation == Gestations.SpawningPollinating)
            {
                var d1 = new Dice();
                var spawn = d1.Rng(2, 6) * 10 * roll;
                OffspringCount = spawn;
            }
            return strategy;
        }
Exemple #16
0
 private double DetermineSize()
 {
     var size = 0.00;
     var dice = new Dice();
     var roll = dice.Rng(6);
     if (SizeClass == SizeClasses.Small)
     {
         switch (roll)
         {
             case 1:
                 size = 0.05;
                 break;
             case 2:
                 size = 0.07;
                 break;
             case 3:
                 size = 0.10;
                 break;
             case 4:
                 size = 0.15;
                 break;
             case 5:
                 size = 0.20;
                 break;
             case 6:
                 size = 0.30;
                 break;
         }
     }
     if (SizeClass == SizeClasses.HumanScale)
     {
         switch (roll)
         {
             case 1:
                 size = 0.50;
                 break;
             case 2:
                 size = 0.70;
                 break;
             case 3:
                 size = 1.00;
                 break;
             case 4:
                 size = 1.50;
                 break;
             case 5:
                 size = 2.00;
                 break;
             case 6:
                 size = 3.00;
                 break;
         }
     }
     if (SizeClass == SizeClasses.Large)
     {
         switch (roll)
         {
             case 1:
                 size = 5.00;
                 break;
             case 2:
                 size = 7.00;
                 break;
             case 3:
                 size = 10.00;
                 break;
             case 4:
                 size = 15.00;
                 break;
             case 5:
                 size = 20.00;
                 break;
             case 6:
                 size = 50.00;
                 break;
         }
     }
     if (Gravity >= 3.50)
     {
         size *= 0.30;
     }
     if (Gravity < 3.50 && Gravity >= 2.50)
     {
         size *= 0.40;
     }
     if (Gravity < 2.50 && Gravity >= 2.00)
     {
         size *= 0.50;
     }
     if (Gravity < 2.00 && Gravity >= 1.50)
     {
         size *= 0.60;
     }
     if (Gravity < 1.50 && Gravity >= 1.25)
     {
         size *= 0.75;
     }
     if (Gravity < 1.25 && Gravity >= 1.00)
     {
         size *= 0.90;
     }
     if (Gravity < 1.00 && Gravity >= 0.90)
     {
         size *= 1.00;
     }
     if (Gravity < 0.90 && Gravity >= 0.80)
     {
         size *= 1.10;
     }
     if (Gravity < 0.80 && Gravity >= 0.70)
     {
         size *= 1.20;
     }
     if (Gravity < 0.70 && Gravity >= 0.60)
     {
         size *= 1.30;
     }
     if (Gravity < 0.60 && Gravity >= 0.50)
     {
         size *= 1.40;
     }
     if (Gravity < 0.50 && Gravity >= 0.40)
     {
         size *= 1.60;
     }
     if (Gravity < 0.40 && Gravity >= 0.30)
     {
         size *= 1.80;
     }
     if (Gravity < 0.30 && Gravity >= 0.20)
     {
         size *= 2.20;
     }
     if (Gravity < 0.20 && Gravity >= 0.10)
     {
         size *= 2.90;
     }
     if (Gravity >= 0.10)
     {
         size *= 4.60;
     }
     return size;
 }
Exemple #17
0
 private Suspicions DetermineSuspicion()
 {
     var suspicion = Suspicions.None;
     var dice = new Dice();
     var roll1 = dice.Rng(6);
     var roll2 = dice.Rng(6);
     var roll = roll1 - roll2;
     if (TrophicDiet == TrophicDiets.PouncingCarnivore || TrophicDiet == TrophicDiets.ChasingCarnivore || TrophicDiet == TrophicDiets.HijackingCarnivore || TrophicDiet == TrophicDiets.TrappingCarnivore)
     {
         roll -= 1;
     }
     if (TrophicDiet == TrophicDiets.GrazingHerbivore)
     {
         roll += 1;
     }
     if (Vision == Visions.Blindness || Vision == Visions.BlindnessSoft)
     {
         roll += 1;
     }
     if (SizeClass == SizeClasses.Large)
     {
         roll -= 1;
     }
     if (SizeClass == SizeClasses.Small)
     {
         roll += 1;
     }
     if (SocialOrganization == SocialOrganizations.Solitary || SocialOrganization == SocialOrganizations.PairBonded)
     {
         roll += 1;
     }
     if (roll >= 3)
     {
         suspicion = Suspicions.VeryFearfull;
     }
     if (roll <= -3)
     {
         suspicion = Suspicions.ExtremlyFearless;
     }
     switch (roll)
     {
         case 2:
             suspicion = Suspicions.Fearfulness;
             break;
         case 1:
             suspicion = Suspicions.Careful;
             break;
         case 0:
             suspicion = Suspicions.Normal;
             break;
         case -1:
             suspicion = Suspicions.Fearlessness;
             break;
         case -2:
             suspicion = Suspicions.VeryFearless;
             break;
     }
     return suspicion;
 }
Exemple #18
0
        private SizeClasses DetermineSizeClass()
        {
            var sizeclass = SizeClasses.None;
            var dice = new Dice();
            var roll = dice.Rng(6);
            if (Gravity <= 0.4)
            {
                roll += 2;
            }
            if (Gravity >= 0.5 && Gravity <= 0.75)
            {
                roll += 1;
            }
            if (Gravity >= 1.5 && Gravity <= 2.00)
            {
                roll -= 1;
            }
            if (Gravity > 2)
            {
                roll -= 2;
            }
            if (LandOrWater == LandWater.Water)
            {
                roll += 1;
            }
            if (WaterHabitat == WaterHabitats.Banks || WaterHabitat == WaterHabitats.OpenOcean)
            {
                roll += 1;
            }
            if (WaterHabitat == WaterHabitats.TropicalLagoon || WaterHabitat == WaterHabitats.RiverStream)
            {
                roll -= 1;
            }
            if (LandHabitat == LandHabitats.Plains)
            {
                roll += 1;
            }
            if (LandHabitat == LandHabitats.IslandBeach || LandHabitat == LandHabitats.Desert || LandHabitat == LandHabitats.Mountain)
            {
                roll -= 1;
            }
            if (TrophicDiet == TrophicDiets.GrazingHerbivore)
            {
                roll += 1;
            }
            if (TrophicDiet == TrophicDiets.ParasiteSymbiont)
            {
                roll -= 4;
            }
            if (PrimaryLocomotion == Locomotions.Slithering || SecondaryLocomotion == Locomotions.Slithering)
            {
                roll -= 1;
            }
            if (PrimaryLocomotion == Locomotions.Wingedflight || SecondaryLocomotion == Locomotions.Wingedflight)
            {
                roll -= 3;
            }

            /////////////////////////
            if (roll <= 2)
            {
                sizeclass = SizeClasses.Small;
            }
            if (roll == 3 || roll == 4)
            {
                sizeclass = SizeClasses.HumanScale;
            }
            if (roll >= 5)
            {
                sizeclass = SizeClasses.Large;
            }
            return sizeclass;
        }
Exemple #19
0
 private Tails DetermineTail()
 {
     var tail = Tails.None;
     var taildice = new Dice();
     var roll = taildice.Rng(6);
     if (Symmetry == Symmetries.Spherical)
     {
         return Tails.None;
     }
     if (PrimaryLocomotion == Locomotions.Swimming || SecondaryLocomotion == Locomotions.Swimming)
     {
         roll += 1;
     }
     if (roll >= 5)
     {
         var dice = new Dice();
         roll = dice.Rng(2, 6);
         switch (roll)
         {
             case 2:
             case 3:
             case 4:
             case 5:
                 tail = Tails.FeatureLess;
                 //TODO: Add 0-Point Advantage/Feature.(Has no Gameplay Effect)
                 break;
             case 6:
                 tail = Tails.Striker;
                 break;
             case 7:
                 tail = Tails.Long;
                 //TODO: Long enhancement
                 break;
             case 8:
                 tail = Tails.Constricting;
                 break;
             case 9:
                 tail = Tails.Barbed;
                 break;
             case 10:
                 tail = Tails.Gripping;
                 break;
             case 11:
                 tail = Tails.Branching;
                 break;
             case 12:
                 tail = Tails.Combination;
                 break;
         }
     }
     else
     {
         tail = Tails.None;
     }
     return tail;
 }
Exemple #20
0
        private Skeletons DetermineSkeleton()
        {
            var skeleton = Skeletons.None;
            var dice = new Dice();
            var roll = dice.Rng(2, 6);
            if (SizeClass == SizeClasses.HumanScale)
            {
                roll += 1;
            }
            if (SizeClass == SizeClasses.Large)
            {
                roll += 2;
            }
            if (LandOrWater == LandWater.Land)
            {
                roll += 1;
            }
            if (PrimaryLocomotion == Locomotions.Slithering || SecondaryLocomotion == Locomotions.Slithering)
            {
                roll -= 1;
            }
            if (PrimaryLocomotion == Locomotions.Immobile || SecondaryLocomotion == Locomotions.Immobile)
            {
                roll -= 1;
            }
            if (Symmetry == Symmetries.Asymmetric)
            {
                roll -= 1;
            }
            if (Gravity <= 0.50)
            {
                roll -= 1;
            }
            if (Gravity >= 1.25)
            {
                roll += 1;
            }

            if (roll <= 3)
            {
                skeleton = Skeletons.None;
            }

            switch (roll)
            {
                case 4:
                case 5:
                    skeleton = Skeletons.Hydrostatic;
                    break;
                case 6:
                case 7:
                    skeleton = Skeletons.External;
                    break;
                case 8:
                case 9:
                case 10:
                    skeleton = Skeletons.Internal;
                    break;
                case 11:
                case 12:
                case 13:
                case 14:
                case 15:
                case 16:
                    skeleton = Skeletons.Combination;
                    break;
            }
            return skeleton;
        }
Exemple #21
0
        private Temperatures DetermineTemperature()
        {
            var temperature = Temperatures.None;
            var dice = new Dice();
            var roll = dice.Rng(2, 6);

            if (Breathing == BreathingMethods.Lungs)
            {
                roll += 1;
            }
            if (Breathing == BreathingMethods.Gills)
            {
                roll -= 1;
            }
            if (SizeClass == SizeClasses.HumanScale || SizeClass == SizeClasses.Large)
            {
                roll += 1;
            }
            if (LandOrWater == LandWater.Land)
            {
                roll += 1;
            }
            if (LandHabitat == LandHabitats.Woodlands || LandHabitat == LandHabitats.Mountain)
            {
                roll += 1;
            }
            if (LandHabitat == LandHabitats.Arctic)
            {
                roll += 2;
            }

            switch (roll)
            {
                case 1:
                case 2:
                case 3:
                case 4:
                    temperature = Temperatures.ColdBloodedwithDis;
                    //TODO: Add Cold-Blooded Disadvantage
                    break;
                case 5:
                case 6:
                    temperature = Temperatures.ColdBlooded;
                    break;
                case 7:
                    temperature = Temperatures.PartialRegulations;
                    break;
                case 8:
                case 9:
                    temperature = Temperatures.WarmBlooded;
                    break;
                case 10:
                case 11:
                case 12:
                case 13:
                case 14:
                case 15:
                case 16:
                case 17:
                    temperature = Temperatures.WarmBloodedMetabolism;
                    //TODO: Add Metabolism Control
                    break;
            }
            return temperature;
        }
Exemple #22
0
        private Skins DetermineSkin()
        {
            var skin = Skins.None;
            if (SkinClass == SkinClasses.Skin)
            {
                var dice = new Dice();
                var roll = dice.Rng(2, 6);
                if (LandHabitat == LandHabitats.Arctic)
                {
                    roll += 1;
                }
                if (LandOrWater == LandWater.Water)
                {
                    roll += 1;
                }
                if (LandHabitat == LandHabitats.Desert)
                {
                    roll -= 1;
                }
                if (TrophicDiet == TrophicDiets.GatheringHerbivore || TrophicDiet == TrophicDiets.GrazingHerbivore)
                {
                    roll += 1;
                }
                if (PrimaryLocomotion == Locomotions.Wingedflight || SecondaryLocomotion == Locomotions.Wingedflight)
                {
                    roll -= 5;
                }

                if (roll <= 4)
                {
                    skin = Skins.SoftSkin;
                }
                switch (roll)
                {
                    case 5:
                        skin = Skins.NormalSkin;
                        break;
                    case 6:
                    case 7:
                        skin = Skins.Hide;
                        break;
                    case 8:
                        skin = Skins.ThickHide;
                        break;
                    case 9:
                        skin = Skins.ArmorShell;
                        break;
                    case 10:
                    case 11:
                    case 12:
                    case 13:
                    case 14:
                    case 15:
                        skin = Skins.Blubber;
                        //TODO: Add Temperature Tolerance
                        break;
                }
            }
            if (SkinClass == SkinClasses.Scales)
            {
                var dice = new Dice();
                var roll = dice.Rng(2, 6);
                if (LandHabitat == LandHabitats.Desert)
                {
                    roll += 1;
                }
                if (TrophicDiet == TrophicDiets.GatheringHerbivore || TrophicDiet == TrophicDiets.GrazingHerbivore)
                {
                    roll += 1;
                }
                if (PrimaryLocomotion == Locomotions.Wingedflight || SecondaryLocomotion == Locomotions.Wingedflight)
                {
                    roll -= 2;
                }
                if (PrimaryLocomotion == Locomotions.Digging || SecondaryLocomotion == Locomotions.Digging)
                {
                    roll -= 1;
                }
                if (roll <= 3)
                {
                    skin = Skins.NormalSkin;
                }

                switch (roll)
                {
                    case 4:
                    case 5:
                    case 6:
                    case 7:
                    case 8:
                        skin = Skins.Scales;
                        break;
                    case 9:
                    case 10:
                        skin = Skins.HeavyScales;
                        break;
                    case 11:
                    case 12:
                    case 13:
                    case 14:
                        skin = Skins.ArmorShell;
                        break;
                }
            }
            if (SkinClass == SkinClasses.Fur)
            {
                var dice = new Dice();
                var roll = dice.Rng(2, 6);
                if (LandHabitat == LandHabitats.Desert)
                {
                    roll -= 1;
                }
                if (LandHabitat == LandHabitats.Arctic)
                {
                    roll += 1;
                }
                if (PrimaryLocomotion == Locomotions.Wingedflight || SecondaryLocomotion == Locomotions.Wingedflight)
                {
                    roll -= 1;
                }
                if (TrophicDiet == TrophicDiets.GatheringHerbivore || TrophicDiet == TrophicDiets.GrazingHerbivore)
                {
                    roll += 1;
                }

                if (roll <= 5)
                {
                    skin = Skins.NormalSkin;
                }

                switch (roll)
                {
                    case 6:
                    case 7:
                        skin = Skins.Fur;
                        break;
                    case 8:
                    case 9:
                        skin = Skins.ThickFur;
                        //TODO: Add Temperature Tolerance
                        break;
                    case 10:
                    case 11:
                        skin = Skins.ThickFurOverHide;
                        break;
                    case 12:
                    case 13:
                    case 14:
                        skin = Skins.Spines;
                        break;
                }
            }
            if (SkinClass == SkinClasses.Feathers)
            {
                var dice = new Dice();
                var roll = dice.Rng(2, 6);
                if (LandHabitat == LandHabitats.Desert)
                {
                    roll -= 1;
                }
                if (LandHabitat == LandHabitats.Arctic)
                {
                    roll += 1;
                }
                if (PrimaryLocomotion == Locomotions.Wingedflight || SecondaryLocomotion == Locomotions.Wingedflight)
                {
                    roll += 1;
                }

                switch (roll)
                {
                    case 1:
                    case 2:
                    case 3:
                    case 4:
                    case 5:
                        skin = Skins.NormalSkin;
                        break;
                    case 6:
                    case 7:
                    case 8:
                        skin = Skins.Feathers;
                        break;
                    case 9:
                    case 10:
                        skin = Skins.ThickFeather;
                        //TODO: Add Temperature Tolerance
                        break;
                    case 11:
                        skin = Skins.FeathersOverHide;
                        //TODO: Add Temperature Tolerance
                        break;
                    case 12:
                    case 13:
                    case 14:
                        skin = Skins.Spines;
                        break;
                }
            }

            if (SkinClass == SkinClasses.Exeskeleton)
            {
                var dice = new Dice();
                var roll = dice.Rng(6);

                if (LandOrWater == LandWater.Water)
                {
                    roll += 1;
                }
                if (PrimaryLocomotion == Locomotions.Immobile || SecondaryLocomotion == Locomotions.Immobile)
                {
                    roll += 1;
                }
                if (PrimaryLocomotion == Locomotions.Wingedflight || SecondaryLocomotion == Locomotions.Wingedflight)
                {
                    roll -= 2;
                }

                if (roll <= 2)
                {
                    skin = Skins.LightExoskeleton;
                }
                switch (roll)
                {
                    case 3:
                    case 4:
                        skin = Skins.ToughExoskeleton;
                        break;
                    case 5:
                        skin = Skins.HeavyExoskeleton;
                        break;
                    case 6:
                    case 7:
                    case 8:
                        skin = Skins.HeavyExoskeleton;
                        break;
                }
            }
            return skin;
        }
Exemple #23
0
 /// <summary>
 ///     This updates the star to the current surface temperature given no alterations
 /// </summary>
 /// <param name="ageL">the age line of the star</param>
 /// <param name="lumin">The current luminosity of the star (used for White Dwarfs)</param>
 /// <param name="age">The age of the star</param>
 /// <param name="mass">The current mass of the star</param>
 /// <param name="ourDice">Ddice (due to randomization of the temperature)</param>
 /// <returns>The current temperature of the star</returns>
 public static double GetCurrentTemp( StarAgeLine ageL, double lumin, double age, double mass, Dice ourDice )
 {
     if (ageL.FindCurrentAgeGroup(age) == StarAgeLine.RetMainbranch)
     {
         return GetInitTemp(mass);
     }
     if (ageL.FindCurrentAgeGroup(age) == StarAgeLine.RetSubbranch)
     {
         return GetInitTemp(mass) - ageL.CalcWithInSubLimit(age) * ( GetInitTemp(mass) - 4800 );
     }
     if (ageL.FindCurrentAgeGroup(age) == StarAgeLine.RetGiantbranch)
     {
         return 3000 + ourDice.Rng(2, 6, -2) * 200;
     }
     return ageL.FindCurrentAgeGroup(age) == StarAgeLine.RetCollaspedstar ? Math.Pow(lumin / Math.Pow(GetRadius(mass, 0, lumin, StarAgeLine.RetCollaspedstar), 2) * ( 5.38937375 * Math.Pow(10, 26) ), 1.00 / 4) : 0;
 }
Exemple #24
0
 private SkinClasses DetermineSkinClass()
 {
     var skinclass = SkinClasses.None;
     var dice = new Dice();
     var roll = dice.Rng(6);
     if (Skeleton == Skeletons.External)
     {
         return SkinClasses.Exeskeleton;
     }
     switch (roll)
     {
         case 1:
         case 2:
             skinclass = SkinClasses.Skin;
             break;
         case 3:
             skinclass = SkinClasses.Scales;
             break;
         case 4:
             skinclass = SkinClasses.Fur;
             break;
         case 5:
             skinclass = SkinClasses.Feathers;
             break;
         case 6:
             skinclass = SkinClasses.Exeskeleton;
             break;
     }
     return skinclass;
 }
Exemple #25
0
        /// <summary>
        ///     This function rolls for mass on a star.
        /// </summary>
        /// <param name="velvetBag">The Ddice object</param>
        /// <param name="orderId">The order ID of the star</param>
        /// <param name="maxMass">the maximum mass. Has a default value of 0.0, indicating no max mass (may be left out)</param>
        /// <returns>The rolled mass of a star</returns>
        public static double RollStellarMass( Dice velvetBag, int orderId, double maxMass = 0.0 )
        {
            int rollA; //roll integers

            if (Math.Abs(maxMass) < 0.0)
            {
                if (!(bool) !OptionCont.StellarMassRangeSet)
                {
                    return velvetBag.RollInRange(OptionCont.MinStellarMass, OptionCont.MaxStellarMass);
                }
                if (OptionCont.ForceGardenFavorable != null && ( orderId != Star.IsPrimary || !(bool) OptionCont.ForceGardenFavorable ))
                {
                    return Star.GetMassByRoll(velvetBag.GurpsRoll(), velvetBag.GurpsRoll());
                }
                rollA = velvetBag.Rng(6);
                if (rollA == 1)
                {
                    rollA = 5;
                }
                if (rollA == 2)
                {
                    rollA = 6;
                }
                if (rollA == 3 || rollA == 4)
                {
                    rollA = 7;
                }
                if (rollA == 5 || rollA == 6)
                {
                    rollA = 8;
                }

                return Star.GetMassByRoll(rollA, velvetBag.GurpsRoll());
            }

            var currPos = Star.GetStellarMassPos(maxMass);

            //error bound checking. The entire program is kinda predicated aroudn the idea you won't have this happen.
            //IF IT DOES, then do the simple method.
            if (currPos == -1)
            {
                double tmpRoll; //test value.
                do
                {
                    tmpRoll = Star.GetMassByRoll(velvetBag.GurpsRoll(), velvetBag.GurpsRoll());
                }
                while (tmpRoll > maxMass);

                return tmpRoll;
            }

            //else, roll for the new index.
            rollA = velvetBag.GurpsRoll();
            var rollB = velvetBag.Rng(rollA, 6); //roll integers

            //get the new index
            if (currPos - rollB <= 0)
            {
                currPos = 0;
            }
            else
            {
                currPos = currPos - rollB;
            }

            return Star.GetMassByIndex(currPos);
        }
Exemple #26
0
        private SocialOrganizations DetermineSocialOrganization()
        {
            var socialorgs = SocialOrganizations.None;
            var dice = new Dice();
            var roll = dice.Rng(2, 6);
            if (TrophicDiet == TrophicDiets.ChasingCarnivore || TrophicDiet == TrophicDiets.HijackingCarnivore || TrophicDiet == TrophicDiets.PouncingCarnivore || TrophicDiet == TrophicDiets.TrappingCarnivore)
            {
                roll -= 1;
            }
            if (TrophicDiet == TrophicDiets.GrazingHerbivore)
            {
                roll += 1;
            }
            if (SizeClass == SizeClasses.Large)
            {
                roll -= 1;
            }
            if (MatingBahavior == MatingBehaviours.Harem)
            {
                roll += 1;
            }
            if (MatingBahavior == MatingBehaviours.NoPair)
            {
                roll -= 1;
            }
            if (roll <= 6)
            {
                socialorgs = SocialOrganizations.Solitary;
            }

            switch (roll)
            {
                case 7:
                case 8:
                    socialorgs = SocialOrganizations.PairBonded;
                    SocialGroupSize = 2;
                    break;
                case 9:
                case 10:
                    socialorgs = SocialOrganizations.SmallGroup;
                    SocialGroupSize = dice.Rng(2, 6);
                    break;
                case 11:
                    socialorgs = SocialOrganizations.MediumGroup;
                    SocialGroupSize = dice.Rng(4, 6);
                    break;
                case 12:
                case 13:
                case 14:
                    socialorgs = SocialOrganizations.LargeHerd;
                    SocialGroupSize = dice.Rng(10) * 10;
                    break;
            }
            return socialorgs;
        }
Exemple #27
0
        /// <summary>
        ///     This places our stars around the primary, as well as creating the secondary stars if called for
        /// </summary>
        /// <param name="ourSystem">The star system to be added to.</param>
        /// <param name="velvetBag">Our Ddice object.</param>
        private static void PlaceOurStars( StarSystem ourSystem, Dice velvetBag )
        {
            //initiate the variables we need to ensure distances are kept
            var maxOrbitalDistance = 600.0;
            var starLimit = ourSystem.SysStars.Count;
            for (var i = 1; i < starLimit; i++)
            {
                var modifiers = 0;
                var minOrbitalDistance = ourSystem.SysStars[i - 1].OrbitalRadius;

                //set the min and max conditions for the first star here.
                int roll;
                double tempVal;
                if (ourSystem.SysStars[i].ParentId == 0 || ourSystem.SysStars[i].ParentId == Star.IsPrimary)
                {
                    //apply modifiers
                    if (ourSystem.SysStars[i].SelfId == Star.IsTrinary)
                    {
                        modifiers = modifiers + 6;
                    }
                    if (OptionCont.ForceGardenFavorable != null)
                    {
                        if ((bool) OptionCont.ForceGardenFavorable && ourSystem.SysStars[i].ParentId == Star.IsPrimary)
                        {
                            modifiers = modifiers + 4;
                        }
                    }

                    if (minOrbitalDistance == 600.0)
                    {
                        //in this situation, orbital 3 or so can't be safely placed because the range is 0.
                        // so we autogenerate it.
                        tempVal = velvetBag.RollRange(25, 25);
                        ourSystem.SysStars[i].OrbitalSep = 5;
                        ourSystem.SysStars[ourSystem.Star2Index].OrbitalRadius = ourSystem.SysStars[ourSystem.Star2Index].OrbitalRadius - tempVal;
                        ourSystem.SysStars[i].OrbitalRadius = 600 + tempVal;
                        ourSystem.SysStars[i].DistFromPrimary = ourSystem.SysStars[i].OrbitalRadius;
                    }
                    else
                    {
                        do
                        {
                            //roll the Ddice and generate the orbital radius
                            do
                            {
                                roll = velvetBag.GurpsRoll(modifiers);
                                if (roll <= 6)
                                {
                                    ourSystem.SysStars[i].OrbitalSep = Star.OrbsepVeryclose;
                                }
                                if (roll >= 7 && roll <= 9)
                                {
                                    ourSystem.SysStars[i].OrbitalSep = Star.OrbsepClose;
                                }
                                if (roll >= 10 && roll <= 11)
                                {
                                    ourSystem.SysStars[i].OrbitalSep = Star.OrbsepModerate;
                                }
                                if (roll >= 12 && roll <= 14)
                                {
                                    ourSystem.SysStars[i].OrbitalSep = Star.OrbsepWide;
                                }
                                if (roll >= 15)
                                {
                                    ourSystem.SysStars[i].OrbitalSep = Star.OrbsepDistant;
                                }
                                tempVal = velvetBag.Rng(2, 6) * GetSepModifier(ourSystem.SysStars[i].OrbitalSep);
                            }
                            while (tempVal <= minOrbitalDistance);

                            //if (ourSystem.sysStars[i].selfID == 2) tempVal = this.velvetBag.six(1, 7) * ourSystem.sysStars[i].getSepModifier();
                            var lowerBound = tempVal - .5 * GetSepModifier(ourSystem.SysStars[i].OrbitalSep);
                            var higherBound = .5 * GetSepModifier(ourSystem.SysStars[i].OrbitalSep) + tempVal;

                            //set for constraints
                            if (lowerBound < minOrbitalDistance)
                            {
                                lowerBound = minOrbitalDistance;
                            }
                            if (higherBound > maxOrbitalDistance)
                            {
                                higherBound = maxOrbitalDistance;
                            }

                            ourSystem.SysStars[i].OrbitalRadius = tempVal;
                            ourSystem.SysStars[i].DistFromPrimary = ourSystem.SysStars[i].OrbitalRadius;
                        }
                        while (ourSystem.SysStars[i].OrbitalRadius <= minOrbitalDistance);

                        //let's see if it has a subcompanion
                        if (ourSystem.SysStars[i].OrbitalSep == Star.OrbsepDistant)
                        {
                            roll = velvetBag.GurpsRoll();
                            if (roll >= 11)
                            {
                                //generate the subcompanion
                                var order = 0;

                                if (ourSystem.SysStars[i].SelfId == Star.IsSecondary)
                                {
                                    order = Star.IsSeccomp;
                                }
                                if (ourSystem.SysStars[i].SelfId == Star.IsTrinary)
                                {
                                    order = Star.IsTricomp;
                                }

                                //add the star
                                ourSystem.AddStar(order, ourSystem.SysStars[i].SelfId, i + 1);

                                ourSystem.SysStars[starLimit].Name = Star.GenGenericName(ourSystem.SysName, i + 1);

                                //set the name, then generate the star
                                ourSystem.SysStars[starLimit].ParentName = ourSystem.SysStars[i].Name;
                                GenerateAStar(ourSystem.SysStars[starLimit], velvetBag, ourSystem.SysStars[i].CurrMass, ourSystem.SysName);
                                starLimit++; //increment the total number of stars we have generated
                            }
                        }
                    }
                }
                else
                {
                    maxOrbitalDistance = ourSystem.SysStars[ourSystem.GetStellarParentId(ourSystem.SysStars[i].ParentId)].OrbitalRadius;
                    //roll for seperation
                    do
                    {
                        //roll the Ddice

                        roll = velvetBag.GurpsRoll(-6);
                        if (roll <= 6)
                        {
                            ourSystem.SysStars[i].OrbitalSep = Star.OrbsepVeryclose;
                        }
                        if (roll >= 7 && roll <= 9)
                        {
                            ourSystem.SysStars[i].OrbitalSep = Star.OrbsepClose;
                        }
                        if (roll >= 10 && roll <= 11)
                        {
                            ourSystem.SysStars[i].OrbitalSep = Star.OrbsepModerate;
                        }
                        if (roll >= 12 && roll <= 14)
                        {
                            ourSystem.SysStars[i].OrbitalSep = Star.OrbsepWide;
                        }
                        if (roll >= 15)
                        {
                            ourSystem.SysStars[i].OrbitalSep = Star.OrbsepDistant;
                        }

                        //set the subcompanion orbital
                        tempVal = velvetBag.Rng(2, 6) * GetSepModifier(ourSystem.SysStars[i].OrbitalSep);
                        tempVal -= 0.5 * GetSepModifier(ourSystem.SysStars[i].OrbitalSep);
                        var higherBound = .5 * GetSepModifier(ourSystem.SysStars[i].OrbitalSep) + tempVal;

                        if (higherBound > maxOrbitalDistance)
                        {
                            higherBound = maxOrbitalDistance;
                        }

                        ourSystem.SysStars[i].OrbitalRadius = tempVal;
                        ourSystem.SysStars[i].DistFromPrimary = ourSystem.SysStars[i].OrbitalRadius + maxOrbitalDistance;
                    }
                    while (ourSystem.SysStars[i].OrbitalRadius > maxOrbitalDistance);
                }

                CalcEccentricity(velvetBag, ourSystem.SysStars[i]);

                var parent = ourSystem.GetStellarParentId(ourSystem.SysStars[i].ParentId);
                ourSystem.SysStars[i].OrbitalPeriod = Star.CalcOrbitalPeriod(ourSystem.SysStars[parent].CurrMass, ourSystem.SysStars[i].CurrMass, ourSystem.SysStars[i].OrbitalRadius);
            }
        }
Exemple #28
0
        private List<SpecialSenses> DetermineSpecialSenses()
        {
            var specialsenses = new List<SpecialSenses>();
            var dice = new Dice();
            var roll = dice.Rng(2, 6);
            //TODO: Add All the Advantages
            //360 Vision
            if (LandHabitat == LandHabitats.Plains || LandHabitat == LandHabitats.Desert)
            {
                roll += 1;
            }
            if (Symmetry == Symmetries.Radial || Symmetry == Symmetries.Spherical)
            {
                roll += 1;
            }
            if (roll >= 11)
            {
                specialsenses.Add(SpecialSenses.ThreeSixtyVision);
            }

            //Absolute Direction
            roll = dice.Rng(2, 6);
            if (WaterHabitat == WaterHabitats.OpenOcean)
            {
                roll += 1;
            }
            if (PrimaryLocomotion == Locomotions.Wingedflight || SecondaryLocomotion == Locomotions.Wingedflight)
            {
                roll += 1;
            }
            if (PrimaryLocomotion == Locomotions.Digging || SecondaryLocomotion == Locomotions.Digging)
            {
                roll += 1;
            }
            if (roll >= 11)
            {
                specialsenses.Add(SpecialSenses.AbsoluteDirection);
            }

            //Discriminatory Hearing
            roll = dice.Rng(2, 6);
            if (Hearing == Hearings.AcutePlusSubSonicAndSonar)
            {
                roll += 2;
            }
            if (roll >= 11)
            {
                specialsenses.Add(SpecialSenses.DisciminatoryHearing);
            }

            //Peripheral Vision
            roll = dice.Rng(2, 6);
            if (LandHabitat == LandHabitats.Plains || LandHabitat == LandHabitats.Desert)
            {
                roll += 1;
            }
            if (TrophicDiet == TrophicDiets.GatheringHerbivore || TrophicDiet == TrophicDiets.GrazingHerbivore)
            {
                roll += 2;
            }
            if (roll >= 10 && roll <= 12)
            {
                specialsenses.Add(SpecialSenses.PeripheralVision);
            }

            //Night Vision
            roll = dice.Rng(2, 6);
            if (LandOrWater == LandWater.Water)
            {
                roll += 2;
            }
            if (TrophicDiet == TrophicDiets.PouncingCarnivore || TrophicDiet == TrophicDiets.ChasingCarnivore || TrophicDiet == TrophicDiets.TrappingCarnivore || TrophicDiet == TrophicDiets.HijackingCarnivore)
            {
                roll += 2;
            }
            if (roll >= 11)
            {
                specialsenses.Add(SpecialSenses.NightVision);
            }

            //Ultravision
            roll = dice.Rng(2, 6);
            if (roll >= 11 && LandOrWater != LandWater.Water && ChemicalBase != ChemicalBasis.Ammonia)
            {
                specialsenses.Add(SpecialSenses.UltraVision);
            }

            //Detect (Heat)
            roll = dice.Rng(2, 6);
            if (TrophicDiet == TrophicDiets.PouncingCarnivore || TrophicDiet == TrophicDiets.ChasingCarnivore || TrophicDiet == TrophicDiets.TrappingCarnivore || TrophicDiet == TrophicDiets.HijackingCarnivore)
            {
                roll += 1;
            }
            if (LandHabitat == LandHabitats.Arctic)
            {
                roll += 1;
            }
            if (roll >= 11 && LandOrWater != LandWater.Water)
            {
                specialsenses.Add(SpecialSenses.DetectHeat);
            }

            //Detect (Electric Fields)
            roll = dice.Rng(2, 6);
            if (TrophicDiet == TrophicDiets.PouncingCarnivore || TrophicDiet == TrophicDiets.ChasingCarnivore || TrophicDiet == TrophicDiets.TrappingCarnivore || TrophicDiet == TrophicDiets.HijackingCarnivore)
            {
                roll += 1;
            }
            if (roll >= 11 && LandOrWater != LandWater.Land)
            {
                specialsenses.Add(SpecialSenses.DetectElectricFields);
            }

            //Perfect Balance
            roll = dice.Rng(2, 6);
            if (PrimaryLocomotion == Locomotions.Climbing || SecondaryLocomotion == Locomotions.Climbing)
            {
                roll += 2;
            }
            if (LandHabitat == LandHabitats.Mountain)
            {
                roll += 1;
            }
            if (Gravity <= 0.50)
            {
                roll -= 1;
            }
            if (Gravity >= 1.50)
            {
                roll += 1;
            }
            if (roll >= 11 && LandOrWater == LandWater.Land)
            {
                specialsenses.Add(SpecialSenses.PerfectBalance);
            }
            //Scanning Sense (Radar)
            roll = dice.Rng(2, 6);
            if (roll >= 11 && SizeClass != SizeClasses.Small && LandOrWater != LandWater.Water)
            {
                specialsenses.Add(SpecialSenses.ScanningSense);
            }
            return specialsenses;
        }
Exemple #29
0
        /// <summary>
        ///     deteremine the orbital ratio between planets
        /// </summary>
        /// <param name="myDice">Ddice object</param>
        /// <returns>The orbital ratio between planets</returns>
        public static double GetOrbitalRatio( Dice myDice )
        {
            double ratio = 0;

            var roll = myDice.GurpsRoll();

            if (roll == 3 || roll == 4)
            {
                ratio = 1.4 + myDice.Rng(1, 5) * .01;
            }

            if (roll == 5 || roll == 6)
            {
                ratio = 1.5 + myDice.Rng(1, 10, -5) * .01;
            }

            if (roll == 7 || roll == 8)
            {
                ratio = 1.6 + myDice.Rng(1, 10, -5) * .01;
            }

            if (roll == 9 || roll == 10 || roll == 11 || roll == 12)
            {
                ratio = 1.7 + myDice.Rng(1, 10, -5) * .01;
            }

            if (roll == 13 || roll == 14)
            {
                ratio = 1.8 + myDice.Rng(1, 10, -5) * .01;
            }

            if (roll == 15 || roll == 16)
            {
                ratio = 1.9 + myDice.Rng(1, 10, -5) * .01;
            }

            if (roll == 17 || roll == 18)
            {
                ratio = 2.0 + myDice.Rng(1, 10, -5) * .01;
            }

            return ratio;
        }
Exemple #30
0
        private int DetermineLimbSegments()
        {
            var limbseg = 0;
            var dice = new Dice();
            var roll = dice.Rng(6);
            if (Symmetry == Symmetries.Trilateral)
            {
                roll -= 1;
            }
            if (Symmetry == Symmetries.Radial)
            {
                roll -= 2;
            }
            if (Symmetry == Symmetries.Spherical)
            {
                return 1;
            }
            if (Symmetry == Symmetries.Asymmetric)
            {
                var d1 = new Dice();
                return d1.Rng(2, 6) - 2;
            }
            ///////////
            if (roll <= 1)
            {
                return 0;
            }
            switch (roll)
            {
                case 2:
                    limbseg = 1;
                    break;
                case 3:
                    limbseg = 2;
                    break;
                case 4:
                    var d2 = new Dice();
                    limbseg = d2.Rng(6);
                    break;
                case 5:
                    var d3 = new Dice();
                    limbseg = d3.Rng(2, 6);
                    break;
                case 6:
                    var d4 = new Dice();
                    limbseg = d4.Rng(3, 6);
                    break;
            }

            return limbseg;
        }