Exemple #1
0
 /// <summary>
 /// Constructor for RuinsDataBlob.
 /// </summary>
 /// <param name="ruinCount"></param>
 /// <param name="ruinTechLevel"> What kinds of things should be found in this ruin? including sophistication of killbots?</param>
 /// <param name="ruinSize">How big are these ruins?</param>
 /// <param name="ruinQuality"> What shape are these ruins in?</param>
 public RuinsDB(uint ruinCount, int ruinTechLevel, RSize ruinSize, RQuality ruinQuality)
 {
     RuinCount     = ruinCount;
     RuinTechLevel = ruinTechLevel;
     RuinSize      = ruinSize;
     RuinQuality   = ruinQuality;
 }
Exemple #2
0
 /// <summary>
 /// Empty constructor for RuinsDataBlob.
 /// </summary>
 public RuinsDB()
 {
     RuinCount     = 0;
     RuinTechLevel = 0;
     RuinSize      = RSize.Count;
     RuinQuality   = RQuality.Count;
 }
Exemple #3
0
        public Ruins()
            : base()
        {
            ///< @todo Generate a name/race for the ruins, and also how should difficulty be effected by having 2 ruins of the same race, with one already looted?
            /// -- Can you have two ruins of the same race on a single body?? i thought it was one planet, 1 runis - SnopyDogy
            /// You cannot have two ruins on the same planet. However ruins of the same species on different planets may be looted. and once you've done the xenology work for said race
            /// it should be easier to crack subsequent ruins of theirs. presumably. I've never really run into this condition in Aurora.
            RuinTechLevel = GameState.RNG.Next(5);

            RuinSize    = RSize.NoRuins;
            RuinQuality = RQuality.Destroyed;
            RuinCount   = 0;

            RuinDiscovery = new BindingList <Faction>();

            Name = "Ruins";
        }
Exemple #4
0
        public Ruins()
            : base()
        {
            ///< @todo Generate a name/race for the ruins, and also how should difficulty be effected by having 2 ruins of the same race, with one already looted?
            /// -- Can you have two ruins of the same race on a single body?? i thought it was one planet, 1 runis - SnopyDogy
            /// You cannot have two ruins on the same planet. However ruins of the same species on different planets may be looted. and once you've done the xenology work for said race
            /// it should be easier to crack subsequent ruins of theirs. presumably. I've never really run into this condition in Aurora.
            RuinTechLevel = GameState.RNG.Next(5);

            RuinSize = RSize.NoRuins;
            RuinQuality = RQuality.Destroyed;
            RuinCount = 0;

            RuinDiscovery = new BindingList<Faction>();

            Name = "Ruins";
        }
Exemple #5
0
        public Ruins(bool GenerateRuins = false)
        {
#warning Generate a name/race for the ruins, and also how should difficulty be effected by having 2 ruins of the same race, with one already looted?
            RuinTechLevel = GameState.RNG.Next(5);

            RuinSize    = RSize.NoRuins;
            RuinQuality = RQuality.Destroyed;
            RuinCount   = 0;

            if (GenerateRuins == true)
            {
                RuinDiscovery = new BindingList <Faction>();

                int size = GameState.RNG.Next(0, 100);

                if (size < 40)
                {
                    RuinSize = RSize.Outpost;
                }
                else if (size < 70)
                {
                    RuinSize = RSize.Settlement;
                }
                else if (size < 90)
                {
                    RuinSize = RSize.Colony;
                }
                else
                {
                    RuinSize = RSize.City;
                }

                int quality = GameState.RNG.Next(0, 100);

                if (quality < 40)
                {
                    RuinQuality = RQuality.Destroyed;
                }
                else if (quality < 70)
                {
                    RuinQuality = RQuality.Ruined;
                }
                else if (quality < 80)
                {
                    RuinQuality = RQuality.PartiallyIntact;
                }
                else if (quality < 90)
                {
                    RuinQuality = RQuality.Intact;

                    if (RuinSize == RSize.City && quality >= 95)
                    {
                        RuinQuality = RQuality.MultipleIntact;
                    }
                }


                int RC = 0;

                /// <summary>
                /// Ruins size range:
                /// </summary>
                switch (RuinSize)
                {
                case RSize.Outpost:
                    RC = GameState.RNG.Next(15, 50);
                    break;

                case RSize.Settlement:
                    RC = GameState.RNG.Next(50, 100);
                    break;

                case RSize.Colony:
                    RC = GameState.RNG.Next(100, 200);
                    break;

                case RSize.City:
                    RC = GameState.RNG.Next(500, 1000);
                    break;
                }

                /// <summary>
                /// Ruins quality adjustment.
                /// </summary>
                switch (RuinQuality)
                {
                case RQuality.Destroyed:
                    RC = (int)Math.Round((float)RC * 1.25f);
                    break;

                case RQuality.Ruined:
                    RC = (int)Math.Round((float)RC * 1.5f);
                    break;

                case RQuality.PartiallyIntact:
                    RC = (int)Math.Round((float)RC * 1.75f);
                    break;

                case RQuality.Intact:
                    RC = (int)Math.Round((float)RC * 2.0f);
                    break;

                case RQuality.MultipleIntact:
                    RC = (int)Math.Round((float)RC * 3.0f);
                    break;
                }

                RuinCount = RC;
            }
        }