예제 #1
0
        public object Clone()
        {
            Keel copy = new Keel();

            copy.BaseMass       = this.BaseMass;
            copy.Designator     = (string)this.Designator.Clone();
            copy.Name           = (string)this.Name.Clone();
            copy.MaxAddedMass   = this.MaxAddedMass;
            copy.Classification = this.Classification;
            return(copy);
        }
예제 #2
0
 public ShipHull(string name, string hullSize)
 {
     ClassName      = name;
     Size           = Keel.ByDesignator(hullSize);
     MaxParts       = Convert.ToInt32(Math.Round(Size.MaxAddedMass / Size.Classification.PartWeight));
     MaxPartsByType = new List <PartCount>();
     MaxPartsByType.Add(new PartCount(typeof(WeaponPart), "", Convert.ToInt32(Math.Round(MaxParts * (Size.Grade == "Light" ? 0.3 : 0.35)))));
     MaxPartsByType.Add(new PartCount(typeof(DefensePart), "", Convert.ToInt32(Math.Round(MaxParts * 0.2))));
     MaxPartsByType.Add(new PartCount(typeof(ActionPart), "", Convert.ToInt32(Math.Round(MaxParts * (Size.Grade == "Light" ? 0.1 : (Size.Grade == "Medium" ? 0.15 : 0.17))))));
     MaxPartsByType.Add(new PartCount(typeof(EnginePart), "", Convert.ToInt32(Math.Round(MaxParts * (Size.Grade == "Light" ? 0.6 : (Size.Grade == "Medium" ? 0.45 : 0.35))))));
     Hitpoints = new StatWithMax(Convert.ToInt32((Size.BaseMass + Size.MaxAddedMass) / 100));
 }