public static String GetFullDescription(IEnumerable<ShipPart> parts) { var bp = new ShipBlueprint(); bp.ShipParts = parts.ToList(); return GetFullDescription(bp); }
public override ShipBlueprint CreateStarbaseBlueprint() { var print = new ShipBlueprint(4, 3); print.AddShipPart(BasicShipPart.GetHull()); print.AddShipPart(BasicShipPart.GetHull()); print.SetBonus(1, 5, 2); print.AddShipPart(BasicShipPart.GetElectronComputer()); return print; }
public override ShipBlueprint CreateInterceptorBlueprint() { var print = new ShipBlueprint(3, 3); print.AddShipPart(BasicShipPart.GetIonCannon()); print.AddShipPart(BasicShipPart.GetNuclearDrive()); print.AddShipPart(BasicShipPart.GetNuclearSource()); print.AddShipPart(new BonusShipPart(1, 2, 0)); return print; }
public GalacticCenter() { Name = ShipNames.GALACTIC_CENTER; IsAncient = true; var part = new ShipPart(); var print = new ShipBlueprint(); print.AddShipPart(part); this._getBlueprintFunc = ()=> {return print;}; }
public virtual ShipBlueprint CreateInterceptorBlueprint() { var print = new ShipBlueprint(); print.AddShipPart(BasicShipPart.GetIonCannon()); print.AddShipPart(BasicShipPart.GetNuclearDrive()); print.AddShipPart(BasicShipPart.GetNuclearSource()); print.Size = 4; print.SetBonus(0, 0, 2); print.MaterialCost = 3; return print; }
public virtual ShipBlueprint CreateStarbaseBlueprint() { var print = new ShipBlueprint(); print.SetBonus(0, 3, 4); print.Size = 4; print.MaterialCost = 4; print.AddShipPart(BasicShipPart.GetHull()); print.AddShipPart(BasicShipPart.GetHull()); print.AddShipPart(BasicShipPart.GetElectronComputer()); print.AddShipPart(BasicShipPart.GetIonCannon()); return print; }
public AncientInterceptor() { this.IsAncient = true; this.Name = ShipNames.INTERCEPTOR; var part = new ShipPart(); part.Initiative = 2; part.Computer = 1; part.Hull = 1; part.CannonDamage = new List<int> { 1,1 }; var print = new ShipBlueprint(); print.AddShipPart(part); this._getBlueprintFunc = () => { return print; }; }
public int GetTotalCannonDamage(ShipBlueprint attacker, ShipBlueprint defender) { var totalDamage = 0; foreach(var cannonDamage in attacker.GetCannonDamage()) { var dice = RandomGenerator.GetDice(); if(dice==6) { totalDamage += cannonDamage; } else if(dice==1) { //nothing } else { if (dice + attacker.Computer - defender.Shield >= 6) totalDamage += cannonDamage; } } return totalDamage; }
public String GetValidationMessage() { var bp = new ShipBlueprint(); bp.ShipParts = WorkshopParts.ToList(); if (bp.EnergyRequirement > bp.EnergySource) return "You need more Energy Sources to meet Energy Requirements"; else if (WorkshopParts.Where(x => x.ID < 0).Count() > 2) return "You may only swap in two available ship parts"; else return ""; }