| 1 | package BalanceOfPower::Commands::Role::TreatiesUnderLimit; | ||||||||||
| 2 | 13 | $BalanceOfPower::Commands::Role::TreatiesUnderLimit::VERSION = '0.400115'; | |||||||||
| 3 | 13 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 13 | ▶ | use v5.10; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 13 | ▶ | use Moo::Role; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | |||||||||||
| 7 | sub nations_under_treaty_limit | ||||||||||
| 8 | 11 | ▶ | { | ||||||||
|
Subroutine
nations_under_treaty_limit: called CC=3 SCAR=11.0
Pod
undocumented
| |||||||||||
| 9 | 11 | my $self = shift; | |||||||||
| 10 | 11 | my @targets = @_; | |||||||||
| 11 | 11 | my @out = (); | |||||||||
| 12 | 11 | for(@targets) | |||||||||
| 13 | { | ||||||||||
| 14 | 34 | my $nation_name = $_; | |||||||||
| 15 | 34 | my $n = $self->world->get_nation($nation_name); | |||||||||
| 16 | 34 | ▶ | if($self->world->get_treaties_for_nation($n->name) < $n->treaty_limit) | ||||||||
|
Branch: 1 branch
| |||||||||||
| 17 | { | ||||||||||
| 18 | 34 | push @out, $nation_name; | |||||||||
| 19 | } | ||||||||||
| 20 | } | ||||||||||
| 21 | 11 | return @out; | |||||||||
| 22 | } | ||||||||||
| 23 | |||||||||||
| 24 | 13 | 1; | |||||||||