private SelectListItem CreateShipOption(ShipSpecification x) { return(new SelectListItem { Text = x.Faction + " - " + x.Name, Value = x.Code, }); }
/* (During the first turn of a scenario, the ship has additional energy tokens * equal to the number of batteries on the ship, representing power stored in the batteries. ) */ public void Initialize(ShipSpecification spec) { ShipInternals = new ShipInternals(spec); foreach (var shipStateAvailableBattery in ShipInternals.AvailableBatteries) { shipStateAvailableBattery.IsCharged = true; } }
public static Pawn FromSpecification(ShipSpecification spec) { return(new Pawn { Id = Guid.NewGuid(), SpecificationCode = spec.Code, ComponentsRemaining = spec.Components.ToDictionary(x => x.Key, x => x.Value) }); }
public ShipInternals(ShipSpecification spec) { _spec = spec; InitializeEnergyLoadout(spec.Loadout.EnergyLoadout); InitializeStructureLoadout(spec.Loadout.StructureLoadout); InitializeSystemsLoadout(spec.Loadout.SystemsLoadout); InitializeWeaponsLoadout(spec.Loadout.Weapons); _shields[Hex.Direction(0)] = new Shield(spec.ShieldStrength[Hex.Direction(0)]); _shields[Hex.Direction(1)] = new Shield(spec.ShieldStrength[Hex.Direction(1)]); _shields[Hex.Direction(2)] = new Shield(spec.ShieldStrength[Hex.Direction(2)]); _shields[Hex.Direction(3)] = new Shield(spec.ShieldStrength[Hex.Direction(3)]); _shields[Hex.Direction(4)] = new Shield(spec.ShieldStrength[Hex.Direction(4)]); _shields[Hex.Direction(5)] = new Shield(spec.ShieldStrength[Hex.Direction(5)]); DamageControl = new DamageControl { RepairPointsPool = 0, RepairPointsProduction = _spec.DamageControlRating }; }
public void Repair(ShipSpecification spec) { ComponentsRemaining = spec.Components.ToDictionary(x => x.Key, x => x.Value); }