Ejemplo n.º 1
0
 /// <summary>
 /// Attacks either the 'crew' or 'ship' on a Tile in range.
 /// </summary>
 /// <param name="tile">The Tile to attack.</param>
 /// <param name="target">Whether to attack 'crew' or 'ship'. Crew deal damage to crew and ships deal damage to ships. Consumes any remaining moves.</param>
 /// <returns>True if successfully attacked, false otherwise.</returns>
 public bool Attack(Pirates.Tile tile, string target)
 {
     return(this.RunOnServer <bool>("attack", new Dictionary <string, object> {
         { "tile", tile },
         { "target", target }
     }));
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Moves a number of crew from this Unit to the given Tile. This will consume a move from those crew.
 /// </summary>
 /// <param name="tile">The Tile to move the crew to.</param>
 /// <param name="amount">The number of crew to move onto that Tile. Amount &lt;= 0 will move all the crew to that Tile.</param>
 /// <param name="gold">The amount of gold the crew should take with them. Gold &lt; 0 will move all the gold to that Tile.</param>
 /// <returns>True if successfully split, false otherwise.</returns>
 public bool Split(Pirates.Tile tile, int amount = 1, int gold = 0)
 {
     return(this.RunOnServer <bool>("split", new Dictionary <string, object> {
         { "tile", tile },
         { "amount", amount },
         { "gold", gold }
     }));
 }
Ejemplo n.º 3
0
 /// <summary>
 /// 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.
 /// </summary>
 /// <param name="tile">The Tile this Unit should move to.</param>
 /// <returns>True if it moved, false otherwise.</returns>
 public bool Move(Pirates.Tile tile)
 {
     return(this.RunOnServer <bool>("move", new Dictionary <string, object> {
         { "tile", tile }
     }));
 }