lib/BalanceOfPower/Commands/MilitaryAid.pm

filter: Statementstmt 52.9% 9 / 17 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 66.6% 2 / 3 Podpod 0.0% 0 / 1 totaltotal 47.8% 11 / 23 CC 3 SCAR 20.3
CC
3
Cov
47%
IA
12.0
BEGIN
1.0
BEGIN
1.0
CRAP 7.6
« lib/BalanceOfPower/Commands/LowerDisorder.pm ↑ Summary blib/lib/BalanceOfPower/Relations/TradeRoute.pm »
1 package BalanceOfPower::Commands::MilitaryAid;
2 11 $BalanceOfPower::Commands::MilitaryAid::VERSION = '0.300010';
3 11 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 11 ▶use BalanceOfPower::Constants ":all";
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6  
7 11 extends 'BalanceOfPower::Commands::TargetNation';
8  
9 sub IA
10 {
11 0 ▶ my $self = shift;
Subroutine IA: not called CC=3 SCAR=24.8
Pod undocumented
12 0 my $actor = $self->get_nation();
13  
14 0 my @friends = $self->world->shuffle("Choosing nation to military aid for " . $actor->name, $self->world->get_friends($actor->name));
15 0 for(@friends)
16 {
17 0 my $f = $_;
18 0 ▶ if($self->world->get_nation($f)->army < MINIMUM_ARMY_FOR_AID)
Branch: 1 branch
BranchTrueFalseTotal
if ($self->world->get_nation($f)->army < 4) 0 0 0
19 {
20 0 return "MILITARY AID FOR $f";
21 }
22 }
23 0 return undef;
24 }
25  
26 11 1;
« lib/BalanceOfPower/Commands/LowerDisorder.pm ↑ Summary blib/lib/BalanceOfPower/Relations/TradeRoute.pm »