Name

Cosair::AI::NmePlanet - Cosair AI Class for Enemy Planets


Synopsis

This class provides specific access to enemy planet information in the game. It is a subclass of Cosair::AI::Planet.


Description

Information Methods

attacking_fleets()

Returns a list of all own fleets attacking this planet. The return value is an array of Cosair::AI::Fleet objects.

attacking_cruisers()

Returns the total number of cruisers in own fleets currently attacking this planet.

attacking_transports()

Returns the total number of transports in own fleets currently attacking this planet.

Planet Intelligence Methods

It is strongly advised to only query intelligence information after you have checked that snapshot() returns a positive turn number. Otherwise you run danger to confuse false boolean and undef return values.

snapshot()

Returns the turn number of the current planet intelligence database record about this planet, or 0 if no such record exists.

snapshot_age()

Returns the age in turns of the current planet intelligence database record, or the undef value if no such record exists.

population()

Returns the population in k the planet possesses in the current planet intelligence database record about this planet, or the undef value if no such record exists.

buildings()

Returns the list of buildings the planet possesses in the current planet intelligence database record about this planet, or the undef value if no such record exists. The return value is an array of building keywords. The building keywords are listed in the CoSAIR Bot Programming Manual.

has_building($)

Returns a boolean value indicating whether the planet possesses a given building in the current planet intelligence database record about this planet, or the undef value if no such record exists. The only parameter is the building keyword of the building to check for. The building keywords are listed in the CoSAIR Bot Programming Manual.

ships()

Returns the number of ships stationed on the planet in the current planet intelligence database record about this planet, or the undef value if no such record exists.

mines()

Returns a boolean value indicating whether the planet possesses any mines in the current planet intelligence database record about this planet, or the undef value if no such record exists.