Name

Cosair::AI::NmeNation - Cosair AI Class for Enemy Nations


Synopsis

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


Description

Information Methods

cruisertype()

Returns the currently known cruisertype of this nation by checking the available nation intelligence and battle noticiations. Returns one of the keywords cruiser, armouredcruiser, assaultcruiser or battlecruiser.

Nation 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 nation intelligence database record about this nation, or 0 if no such record exists.

snapshot_age()

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

gold()

Returns the amount of gold the nation possesses in the current nation intelligence database record about this nation, or the undef value if no such record exists.

techs()

Returns the list of techs the nation possesses in the current nation intelligence databaserecord about this nation, or the undef value if no such record exists. The return value is an array of technology keywords. The technology keywords are listed in the CoSAIR Bot Programming manual.

has_tech($)

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

active_freighters()

Returns the number of active freighters the nation possesses in the current nation intelligence databaserecord about this nation, or the undef value if no such record exists.

agent_ranks()

Returns the sum of the nations agents ranks in the current nation intelligence databaserecord about this nation, or the undef value if no such record exists.

Statistical Methods

counterespionage_incidents()

Returns the list of all counterespionage incidents this enemy nation is responsible for.