Name

Cosair::AI::Fleet - Cosair AI Fleet Class


Synopsis

This class provides access to fleet information in the game and an interface to fleet actions.


Description

Information Methods

id()

Returns the unique numerical id of the fleet.

status()

Returns the status of the fleet. Available return values are:

cruisers()

Returns the number of cruisers belonging to the fleet.

transports()

Returns the number of transports belonging to the fleet.

stationed_on_planet()

Returns the planet id the fleet is stationed on, or the undef value if the fleet is currently moving.

Movement Related Methods

target_id()

Returns the id of the planet the fleet is currently moving to, or the undef value if the fleet is currently stationed on a planet.

duration_left()

Returns the number of turns the fleet needs until it reaches its target, or the undef value if the fleet is currently stationed on a planet.

move_ships($$$)

Moves the given number of ships to a given target. The first parameter is a Cosair::AI::Planet object, the target planet. The second parameter is the number of cruisers to move. The third parameter is the number of transports to move.