Whether this Unit has performed its action this turn.
How many crew are on this Tile. This number will always be <= crewHealth.
How much total health the crew on this Tile have.
String representing the top level Class that this game object is an instance of. Used for reflection to create new instances on clients, but exposed for convenience should AIs want this data.
How much gold this Unit is carrying.
A unique id for each instance of a GameObject or a sub class. Used for client and server communication. Should never change value after being set.
Any strings logged will be stored here. Intended for debugging.
How many more times this Unit may move this turn.
The Player that owns and can control this Unit, or null if the Unit is neutral.
(Merchants only) The path this Unit will follow. The first element is the Tile this Unit will move to next.
If a ship is on this Tile, how much health it has remaining. 0 for no ship.
(Merchants only) The number of turns this merchant ship won't be able to move. They will still attack. Merchant ships are stunned when they're attacked.
(Merchants only) The Port this Unit is moving to.
The Tile this Unit is on.
Attacks either the 'crew' or 'ship' on a Tile in range.
The Tile to attack.
Whether to attack 'crew' or 'ship'. Crew deal damage to crew and ships deal damage to ships. Consumes any remaining moves.
True if successfully attacked, false otherwise.
Buries gold on this Unit's Tile. Gold must be a certain distance away for it to get interest (Game.minInterestDistance).
How much gold this Unit should bury. Amounts <= 0 will bury as much as possible.
True if successfully buried, false otherwise.
Puts gold into an adjacent Port. If that Port is the Player's port, the gold is added to that Player. If that Port is owned by merchants, it adds to that Port's investment.
The amount of gold to deposit. Amounts <= 0 will deposit all the gold on this Unit.
True if successfully deposited, false otherwise.
Digs up gold on this Unit's Tile.
How much gold this Unit should take. Amounts <= 0 will dig up as much as possible.
True if successfully dug up, false otherwise.
Adds a message to this GameObject's logs. Intended for your own debugging purposes, as strings stored here are saved in the gamelog.
A string to add to this GameObject's log. Intended for debugging.
Moves this Unit from its current Tile to an adjacent Tile. If this Unit merges with another one, the other Unit will be destroyed and its tile will be set to null. Make sure to check that your Unit's tile is not null before doing things with it.
The Tile this Unit should move to.
True if it moved, false otherwise.
Regenerates this Unit's health. Must be used in range of a port.
True if successfully rested, false otherwise.
Moves a number of crew from this Unit to the given Tile. This will consume a move from those crew.
The Tile to move the crew to.
The number of crew to move onto that Tile. Amount <= 0 will move all the crew to that Tile.
The amount of gold the crew should take with them. Gold < 0 will move all the gold to that Tile.
True if successfully split, false otherwise.
A toString override for easier debugging.
A human readable representation of the game object.
Takes gold from the Player. You can only withdraw from your own Port.
The amount of gold to withdraw. Amounts <= 0 will withdraw everything.
True if successfully withdrawn, false otherwise.
Generated using TypeDoc
A unit group in the game. This may consist of a ship and any number of crew.