Пример #1
0
        public static CelestialSatellite Generate(Dice die)
        {
            CelestialSatellite celestialSatellite = new CelestialSatellite();

            celestialSatellite.CelestialType    = GenerateCelestialSatelliteType(die);
            celestialSatellite.TerraformingTier = GenerateTerraformationTier(die);

            if (celestialSatellite.TerraformingTier == TerraformationTier.Uninhabitable ||
                celestialSatellite.CelestialType == CelestialSatelliteType.GasCloud)
            {
                celestialSatellite.StageOfLife = LifeStage.NoLife;
            }
            else if (celestialSatellite.TerraformingTier == TerraformationTier.T1 ||
                     celestialSatellite.TerraformingTier == TerraformationTier.T2)
            {
                celestialSatellite.StageOfLife = GenerateStageOfLifeT1T2(die);
            }
            else
            {
                celestialSatellite.StageOfLife = GenerateStageOfLife(die);
            }

            // Calculate Resource Value
            celestialSatellite.ResourceValue = GenerateResourceValue(die);
            if (celestialSatellite.TerraformingTier == TerraformationTier.Uninhabitable)
            {
                celestialSatellite.ResourceValue += die.Roll(1, 10) + 10;
            }
            else if (celestialSatellite.TerraformingTier == TerraformationTier.T1)
            {
                celestialSatellite.ResourceValue += die.Roll(1, 5);
            }
            else if (celestialSatellite.TerraformingTier == TerraformationTier.T2)
            {
                celestialSatellite.ResourceValue += die.Roll(1, 3);
            }
            else if (celestialSatellite.TerraformingTier == TerraformationTier.T5)
            {
                celestialSatellite.ResourceValue += die.Roll(1, 5) + 3;
            }

            // Generate Sentient Species
            if (celestialSatellite.StageOfLife == LifeStage.SentientLife)
            {
                int numberOfSentients = GenerateNumberOfSentients(die);
                for (int i = 0; i < numberOfSentients; i++)
                {
                    celestialSatellite.Sentients.Add(SentientSpecies.Generate(die));
                }
            }

            return(celestialSatellite);
        }
Пример #2
0
        public static CelestialBody Generate(Dice die)
        {
            CelestialBody celestialObject = new CelestialBody();

            celestialObject.CelestialType = GenerateCelestialBodyType(die);

            // Terraforming Tier
            if (celestialObject.CelestialType == CelestialBodyType.Blackhole ||
                celestialObject.CelestialType == CelestialBodyType.SubStar ||
                celestialObject.CelestialType == CelestialBodyType.Wormhole ||
                celestialObject.CelestialType == CelestialBodyType.Comet)
            {
                celestialObject.TerraformingTier = TerraformationTier.Uninhabitable;
            }
            else
            {
                celestialObject.TerraformingTier = GenerateTerraformationTier(die);
            }

            // Stage of Life
            if (celestialObject.TerraformingTier == TerraformationTier.Uninhabitable ||
                celestialObject.CelestialType == CelestialBodyType.Blackhole ||
                celestialObject.CelestialType == CelestialBodyType.SubStar ||
                celestialObject.CelestialType == CelestialBodyType.Wormhole ||
                celestialObject.CelestialType == CelestialBodyType.Comet)
            {
                celestialObject.StageOfLife = LifeStage.NoLife;
            }
            else if (celestialObject.TerraformingTier == TerraformationTier.T1 ||
                     celestialObject.TerraformingTier == TerraformationTier.T2 ||
                     celestialObject.CelestialType == CelestialBodyType.GasPlanet)
            {
                celestialObject.StageOfLife = GenerateStageOfLifeT1T2(die);
            }
            else
            {
                celestialObject.StageOfLife = GenerateStageOfLife(die);
            }

            // Calculate Resource Value
            celestialObject.ResourceValue = GenerateResourceValue(die);
            if (celestialObject.CelestialType == CelestialBodyType.Blackhole || celestialObject.CelestialType == CelestialBodyType.Wormhole)
            {
                celestialObject.ResourceValue = 0;
            }
            else if (celestialObject.TerraformingTier == TerraformationTier.Uninhabitable)
            {
                celestialObject.ResourceValue += die.Roll(1, 10) + 10;
            }
            else if (celestialObject.TerraformingTier == TerraformationTier.T1)
            {
                celestialObject.ResourceValue += die.Roll(1, 5);
            }
            else if (celestialObject.TerraformingTier == TerraformationTier.T2)
            {
                celestialObject.ResourceValue += die.Roll(1, 3);
            }
            else if (celestialObject.TerraformingTier == TerraformationTier.T5)
            {
                celestialObject.ResourceValue += die.Roll(1, 5) + 3;
            }

            // Generate Sentient Species
            if (celestialObject.StageOfLife == LifeStage.SentientLife)
            {
                int numberOfSentients = GenerateNumberOfSentients(die);
                for (int i = 0; i < numberOfSentients; i++)
                {
                    celestialObject.Sentients.Add(SentientSpecies.Generate(die));
                }
            }

            // Generate Celestial Satellites
            if (celestialObject.CelestialType == CelestialBodyType.Comet)
            {
            }
            else if (celestialObject.CelestialType == CelestialBodyType.Wormhole)
            {
            }
            //else if (celestialObject.CelestialType == CelestialBodyType.AsteroidBelt) { }
            else
            {
                int numberOfCelestialSatellites = GenerateNumberOfCelestialSatellites(die);
                for (int i = 0; i < numberOfCelestialSatellites; i++)
                {
                    celestialObject.OrbitingSatellites.Add(CelestialSatellite.Generate(die));
                }
            }

            return(celestialObject);
        }