lib/BalanceOfPower/Commands/EconomicAid.pm

filter: Statementstmt 40.0% 6 / 15 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 50.0% 1 / 2 Podpod 0.0% 0 / 1 totaltotal 35.0% 7 / 20 CC 2 SCAR 14.7
CC
2
Cov
35%
IA
6.0
BEGIN
1.0
CRAP 4.3
« blib/lib/BalanceOfPower/Role/Mapmaker.pm ↑ Summary blib/lib/BalanceOfPower/Commands/BoostProduction.pm »
1 package BalanceOfPower::Commands::EconomicAid;
2 11 $BalanceOfPower::Commands::EconomicAid::VERSION = '0.300010';
3 11 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5  
6 11 extends 'BalanceOfPower::Commands::TargetNation';
7  
8 sub IA
9 {
10 0 ▶ my $self = shift;
Subroutine IA: not called CC=2 SCAR=17.9
Pod undocumented
11 0 my $actor = $self->get_nation();
12  
13 0 my @hates = $self->world->get_hates($actor->name);
14 0 ▶ if(@hates)
Branch: 1 branch
BranchTrueFalseTotal
if (@hates) 0 0 0
15 {
16 #Minor hate is used
17 0 @hates = sort { $b->factor <=> $a->factor } @hates;
18 0 my $other = $hates[0]->destination($actor->name);
19 0 return "ECONOMIC AID FOR $other";
20 }
21 0 return undef;
22 }
23  
24 11 1;
« blib/lib/BalanceOfPower/Role/Mapmaker.pm ↑ Summary blib/lib/BalanceOfPower/Commands/BoostProduction.pm »