line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package BalanceOfPower::Commands::Role::TreatiesUnderLimit; |
2
|
|
|
|
|
|
|
$BalanceOfPower::Commands::Role::TreatiesUnderLimit::VERSION = '0.400110'; |
3
|
13
|
|
|
13
|
|
3971
|
use strict; |
|
13
|
|
|
|
|
16
|
|
|
13
|
|
|
|
|
290
|
|
4
|
13
|
|
|
13
|
|
105
|
use v5.10; |
|
13
|
|
|
|
|
27
|
|
5
|
13
|
|
|
13
|
|
41
|
use Moo::Role; |
|
13
|
|
|
|
|
12
|
|
|
13
|
|
|
|
|
65
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
sub nations_under_treaty_limit |
8
|
|
|
|
|
|
|
{ |
9
|
11
|
|
|
11
|
0
|
8
|
my $self = shift; |
10
|
11
|
|
|
|
|
15
|
my @targets = @_; |
11
|
11
|
|
|
|
|
11
|
my @out = (); |
12
|
11
|
|
|
|
|
17
|
for(@targets) |
13
|
|
|
|
|
|
|
{ |
14
|
31
|
|
|
|
|
28
|
my $nation_name = $_; |
15
|
31
|
|
|
|
|
71
|
my $n = $self->world->get_nation($nation_name); |
16
|
31
|
50
|
|
|
|
74
|
if($self->world->get_treaties_for_nation($n->name) < $n->treaty_limit) |
17
|
|
|
|
|
|
|
{ |
18
|
31
|
|
|
|
|
54
|
push @out, $nation_name; |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
} |
21
|
11
|
|
|
|
|
38
|
return @out; |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
1; |