Name

Cosair::AI::Agent - Cosair AI Agent Class


Synopsis

This class provides access to agent information in the game.


Description

Information Methods

id()

Returns the unique numerical id of this agent.

name()

Returns the name of the Agent.

status()

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

rank()

Returns the current rank of the agent. The return value is a number between 1 and 5, or the undef value if the agent has been exterminated previously.

duration()

Depending on the current status of the agent, this method either returns the number of turns until the agent is finished recruiting, arriving at his mission target or being available again after a previous mission.

Mission Related Methods

mission_target_id()

Returns the id of the agent's current mission target planet, or the undef value if the agent is currently on no mission.

mission_action()

Returns the kind of action the agent will try to execute on his mission, or the undef value if the agent is currently on no mission. The return value is an agent action keyword. The agent action keywords are listed in the CoSAIR Bot Programming Manual.

start_mission($$)

Start a mission with the agent. The first parameter is the target for the mission, a Cosair::AI::NmePlanet object. The second parameter is an agent action keyword describing the mission. The agent action keywords are listed in the Cosair Bot Programming Manual.

success_chance($$)

Returns the success chance of the agent for a given action against an assumed counterespionage value. The first parameter is an agent action keyword describing the mission. The agent action keywords are listed in the Cosair Bot Programming Manual. The second parameter is the assumed counterespionage value of the target nation.