//image or at least image path if gonna show /// <summary> /// Create a new hull /// </summary> /// <param name="name">name of the hull</param> /// <param name="speed">base speed of the hull</param> /// <param name="man">base manoeuvrability of hull</param> /// <param name="det">base detection rating of hull</param> /// <param name="hullint">base hull integrity of the hull</param> /// <param name="armour">base armour value of the hull</param> /// <param name="space">base available space in hull</param> /// <param name="sp">cost of the hull</param> /// <param name="type">which type(s) this hull can mount components for</param> /// <param name="special">special rules for this hull</param> /// <param name="origin">rulebook this hull can be found in</param> /// <param name="page">page number to find the hull on</param> /// <param name="turrets">turret rating of the hull</param> /// <param name="prow">number of prow weapon slots</param> /// <param name="dorsal">number of dorsal weapon slots</param> /// <param name="side">number of port weapon slots</param> /// <param name="keel">number of keel weapon slots</param> /// <param name="aft">number of aft weapon slots</param> /// <param name="frontal">Default prow weapon</param> /// <param name="broadside">Default broadside weapons</param> /// <param name="comps">Default supplemental components</param> /// <param name="command">Command modifier of this hull</param> /// <param name="maxspeed">maximum speed of ship. <1 = unlimited</param> /// <param name="power">Power generated(or used)by hull, not including built in systems(those should be listed in themselves)</param> /// <param name="history">History this hull always has</param> /// <param name="bs">Modifier to ballistic skill tests with this hull</param> /// <param name="locked">If the ship has been locked so it may not add more armour</param> /// <param name="navigate">modifier to navigate warp</param> /// <param name="shields">hulltypes of the shields which may be added</param> public Hull(string name, int speed, int man, int det, int hullint, int armour, int space, int sp, HullType type, String special, RuleBook origin, byte page, int turrets = 1, int prow = 0, int dorsal = 0, int side = 0, int keel = 0, int aft = 0, Weapon frontal = null, Weapon broadside = null, Supplemental[] comps = null, int command = 0, int maxspeed = 0, int power = 0, ShipHistory history = ShipHistory.None, int bs = 0, bool locked = false, int navigate = 0, HullType shields = HullType.None) : base(name, sp, power, space, special, origin, page, type) { this.Speed = speed; this.Manoeuvrability = man; this.DetectionRating = det; this.HullIntegrity = hullint; this.Armour = armour; this.TurretRating = turrets; this.ProwSlots = prow; this.DorsalSlots = dorsal; this.SideSlots = side; this.KeelSlots = keel; this.AftSlots = aft; this.DefaultProw = frontal; this.DefaultBroadside = broadside; this.DefaultComponents = comps; this.Command = command; this.MaxSpeed = maxspeed; this.History = history; this.BSModifier = bs; this.ArmourLocked = locked; this.NavigateWarp = navigate; this.VoidShields = (shields == HullType.None ? type : shields); }
public void Context() { _unitOfWork = new NhibernateUnitOfWork(new CoreDddSharedNhibernateConfigurator()); _unitOfWork.BeginTransaction(); _newShip = new ShipBuilder().Build(); _unitOfWork.Save(_newShip); _unitOfWork.Clear(); _persistedShip = _unitOfWork.Get <Ship>(_newShip.Id); _persistedShipHistory = _persistedShip.ShipHistories.SingleOrDefault(); }
/// <summary> /// Just special rules to display as text /// </summary> /// <param name="self">Complication</param> /// <returns>Special rules to print</returns> public static string Special(this ShipHistory self) { switch (self) { case ShipHistory.ReliquaryOfMars: return("Must have an archeotech component. Tech priests of Mars see vessel as holy and may wish to visit or possess it."); case ShipHistory.Haunted: return("-5 to command tests against this vessel. Spirits may cause other issues."); case ShipHistory.EmissaryOfTheImperator: return("+15 to intimidate tests and -5 to all other social tests, ship is not subtle"); case ShipHistory.WolfInSheepsClothing: return("Up to 3 components will be hidden from scans or appear as a smaller component of same type, may have hidden passageways or storage holds"); case ShipHistory.TurbulentPast: return("All crew memebers have -20 interacting with one group and +20 with an opposing group chosen at creation"); case ShipHistory.DeathCult: return("Death cult on board"); case ShipHistory.WrestedFromASpaceHulk: return("When the crew suffers a misfortune, GM rolls twice and chooses the worse result"); case ShipHistory.TemperamentalWarpEngine: return("When travelling through the warp roll d10. 1-6: increase time by 1d5 weeks, 7+: reduce time by 1d5 weeks. May also occasionally end up somewhere other than where it intended"); case ShipHistory.FinancesInArrears: return("Bound to a financer, all objectives require 50 extra achievement points. The financer may also act as a contact too"); case ShipHistory.Xenophilous: return("Ship must have 1 Xenotech component, -20 to repair if character does not have Forbidden Lore(Xenos)"); default: return(null); } }
/// <summary> /// Get the name for printing of this complication /// </summary> /// <param name="self">Complication</param> /// <returns>Enum name as printable name</returns> public static string Name(this ShipHistory self) { switch (self) { case ShipHistory.ReliquaryOfMars: return("Reliquary of Mars"); case ShipHistory.Haunted: return("Haunted"); case ShipHistory.EmissaryOfTheImperator: return("Emissary of the Imperator"); case ShipHistory.WolfInSheepsClothing: return("Wolf in Sheeps Clothing"); case ShipHistory.TurbulentPast: return("Turbulent Past"); case ShipHistory.DeathCult: return("Death Cult"); case ShipHistory.WrestedFromASpaceHulk: return("Wrested from a Space Hulk"); case ShipHistory.TemperamentalWarpEngine: return("Temperamental Warp Engine"); case ShipHistory.FinancesInArrears: return("Finances in Arrears"); case ShipHistory.Xenophilous: return("Xenophilous"); default: return(null); } }
//image or at least image path if gonna show /// <summary> /// Create a new hull /// </summary> /// <param name="name">name of the hull</param> /// <param name="speed">base speed of the hull</param> /// <param name="man">base manoeuvrability of hull</param> /// <param name="det">base detection rating of hull</param> /// <param name="hullint">base hull integrity of the hull</param> /// <param name="armour">base armour value of the hull</param> /// <param name="space">base available space in hull</param> /// <param name="sp">cost of the hull</param> /// <param name="type">which type(s) this hull can mount components for</param> /// <param name="special">special rules for this hull</param> /// <param name="origin">rulebook this hull can be found in</param> /// <param name="page">page number to find the hull on</param> /// <param name="turrets">turret rating of the hull</param> /// <param name="prow">number of prow weapon slots</param> /// <param name="dorsal">number of dorsal weapon slots</param> /// <param name="side">number of port weapon slots</param> /// <param name="keel">number of keel weapon slots</param> /// <param name="aft">number of aft weapon slots</param> /// <param name="frontal">Default prow weapon</param> /// <param name="broadside">Default broadside weapons</param> /// <param name="comps">Default supplemental components</param> /// <param name="command">Command modifier of this hull</param> /// <param name="maxspeed">maximum speed of ship. <1 = unlimited</param> /// <param name="power">Power generated(or used)by hull, not including built in systems(those should be listed in themselves)</param> /// <param name="history">History this hull always has</param> /// <param name="bs">Modifier to ballistic skill tests with this hull</param> /// <param name="locked">If the ship has been locked so it may not add more armour</param> /// <param name="navigate">modifier to navigate warp</param> /// <param name="shields">hulltypes of the shields which may be added</param> public Hull(string name, int speed, int man, int det, int hullint, int armour, int space, int sp, HullType type, String special, RuleBook origin, byte page, int turrets = 1, int prow = 0, int dorsal = 0, int side = 0, int keel = 0, int aft = 0, Weapon frontal = null, Weapon broadside = null, Supplemental[] comps = null, int command = 0, int maxspeed = 0, int power = 0, ShipHistory history = ShipHistory.None, int bs = 0, bool locked = false, int navigate = 0, HullType shields = HullType.None) : base(name, sp, power, space, special, origin, page, type) { this.Speed = speed; this.Manoeuvrability = man; this.DetectionRating = det; this.HullIntegrity = hullint; this.Armour = armour; this.TurretRating = turrets; this.ProwSlots = prow; this.DorsalSlots = dorsal; this.SideSlots = side; this.KeelSlots = keel; this.AftSlots = aft; this.DefaultProw = frontal; this.DefaultBroadside = broadside; this.DefaultComponents = comps; this.Command = command; this.MaxSpeed = maxspeed; this.History = history; this.BSModifier = bs; this.ArmourLocked = locked; this.NavigateWarp = navigate; this.VoidShields = (shields == HullType.None ? type : shields); }