|
StarShipInfo Class The StarShipInfo class represents the information about a StarShip that is available to your Brain. Your Brain accesses a list of StarShipInfo objects via its StarShips and MyStarShips properties. Only StarShips that are visible to your Brain are exposed in these lists. General Properties These properties are available to all StarShipInfo objects. public bool OwnedByMeReturns true if the StarShip is owned by the Player that the Brain is controlling. public bool IdentifiedByMeReturns true if the StarShip has been identified by the Player controlling the Brain. StarShips that have not been identified yet appear as question mark symbols on the map. For unidentified StarShips, many of the descriptive properties below will not return correct values, so be sure to check to see if the StarShip has been identified before performing any actions based on those properties. public bool TaggedByMeReturns true if the StarShip has been tagged by one the Brain's InkSpots. public Point Locationpublic int X public int Y These properties provide access to the StarShip's location. Descriptive Properties These properties will return correct values only if the StarShip is identified to your Brain. Unidentified StarShips will return zero or false, depending on the property return type. public bool AttackAdjacentReturns whether or not the Brain has set the StarShip to automatically attack adjacent enemy StarShips. public int CargoReturns the number of Resources currently being carried by a Freighter. public IList<int > CloakArrowsReturns a list of integers that contains the directions that cloaked StarShips have been detected by a CloakDetector. The directions are expressed as 0=North, 1=NorthEast, etc. public bool CloakedReturns true if the StarShip is cloaked. public string CodeReturns the StarShip's unique 3 character code. public int EffectiveWeaponsAvailable only to StarShips owned by the Brain. Returns the effective Weapons rating, which is the WarShip or DoppleShip's Weapons rating plus the influence of CommandShips in range. public int EnginesReturns the StarShip's Engine rating. public StarSystemInfo DraggingReturns the StarSystem that a GravShip is currently dragging, or null if the ship is not dragging. public double HealthAn expression of the damage done to the StarShip. A value of 100% indicates a StarShip with no damage. public bool IsDamagedReturns true if the StarShip has suffered any damage. public int KnownWeaponsReturns an unidentified enemy StarShip's known Weapons rating. This value is determined once the StarShip interacts with one of your own StarShips, and appears on the map as a "W" value with a question mark next to it; i.e. "W4?". For example, assume an enemy unidentified StarShip has destroyed one of your WarShips that had 5 Weapons. The Weapons rating of the enemy StarShip must be at least 6. public int MaxEnginesReturns the maximum number of Engines (without considering damage) of the StarShip. public int MaxValueReturns the maximum rating of the StarShip's Primary System (without considering damage). public OrderType OrderReturns the type of order currently assigned to the StarShip. OrderType is an enum that contains descriptive values of all of the possible order types. The method will return OrderType.None if the StarShip does not have an order. public string OwnerReturns a string indicating the name of the StarShip's owner. public int OwnerIntReturns the integer index of the Player owning the StarShip. The index values range from 0 to Number of Players - 1. public int ResourcesReturns the number of Resources currently being held at a BattleStation. public StarShipType ShipTypeReturns the StarShipType of the StarShip. StarShipType is an enum type that contains the values of the 28 available StarShip types. If the StarShip is unidentified, the methods returns StarShipType.WarShip. public StarShipInfo TuggedByIf the StarShip is being tugged by a Tug, this property returns the StarShip doing the tugging, otherwise the property returns null. public StarShipInfo TuggingReturns the StarShip that a Tug is currently tugging, or null if the ship is not tugging. public int ValueReturns the rating of the StarShip's Primary System; Weapons for WarShips, Scanners for ScanShips, etc. |