/// <summary> /// This is the full constructor /// </summary> /// <param name="oType">The type of the object</param> /// <param name="oMass">The mass of the object</param> /// <param name="oDist">The distance from the center</param> public AstronomicalObject(AstroObjectType oType, double? oMass, double oDist, double? brightness) { this.objType = oType; this.objMass = oMass; this.distFromPrimary = oDist; this.stellarBrightness = brightness; this.objectDestroyed = false; }
public AstronomicalObject(AstroObjectType oType) { this.objType = oType; this.objMass = null; this.stellarBrightness = null; this.distFromPrimary = 0; this.objectDestroyed = false; }
/// <summary> /// This function converts the astronomical object to mass. /// </summary> /// <param name="aType">The object</param> /// <returns>the mass of the type</returns> public static double convBonusAstroObjectToAge(AstroObjectType aType, Dice d) { switch (aType) { case AstroObjectType.BlackHole: return new RangePair(5.0, 10.0).RollInRange(d); case AstroObjectType.Pulsar: return new RangePair(1.4, 5.0).RollInRange(d); case AstroObjectType.TypeFGiant: return new RangePair(2.0, 5.0).RollInRange(d); case AstroObjectType.WhiteDwarf: return new RangePair(.15, 1.4).RollInRange(d); case AstroObjectType.RedGiant: return new RangePair(.5, 8).RollInRange(d); case AstroObjectType.TypeOGiant: return new RangePair(5.0, 50.0).RollInRange(d); case AstroObjectType.TypeBGiant: return new RangePair(4.0, 10.0).RollInRange(d); case AstroObjectType.Supergiant: return new RangePair(25.0, 1000.0).RollInRange(d); case AstroObjectType.NeutronStar: return new RangePair(1.4, 5.0).RollInRange(d); case AstroObjectType.Anomaly: return 0; default: return new RangePair(0.1, 2.0).RollInRange(d); } }
//***************************** ASTRONOMICAL OBJECT GENERATION FUNCTIONS /// <summary> /// Helper function. Nebulas will be largely null beyond the type. This just adds a generic object /// </summary> /// <param name="objType">The object type being added</param> public void addObject(AstroObjectType objType) { this.stellarMembers.Add(new AstronomicalObject(objType)); }