NAME

Games::Lacuna::Task::Role::Helper - Various helper methods

METHODS

my_bodies

Returns an array of your body IDs

my_planets

Returns an array of your planet IDs

my_stations

Returns an array of alliance stations IDs

my_body_status

my $body_status = $self->my_body_status($body_id OR $body_name);

Returns the status hash of a given body/planet.

my_body_id

my $body_id = $self->my_body_id($body_name);

Returns the id for a given body name. Ignores case and accents so that eg. 'Hà Nôi' equals 'HA NOI'.

buildings_body

my $body_buildings = $self->buildings_body($body_id OR $boSdy_name);

Returns all buildings for a given planet.

can_afford

$self->can_afford($planet_id or $planet_stats_hash,$cost_hash);

Calculates if the upgrade/repair can be afforded

find_building

my @spaceports = $self->find_building($body_id or $body_name,'Space Port');

Finds all buildings on a given body of a given type ordered by level.

home_planet_id

Returns the id of the empire' home planet id

planet_ids

Returns the empire' planet ids

university_level

Returns your empire' university level

send_message

$self->send_message($subject, $message);

Send yourself a notification via the in-game messaging system.

max_resource_building_level

my $level = $self->max_resource_building_level($body_id);

Returns the max possible ressource building level for the given planet.

can_afford