« 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
| |||||||||||
| 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; | |||||||||