« 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
| |||||||||||
| 19 | { | ||||||||||
| 20 | 0 | return "MILITARY AID FOR $f"; | |||||||||
| 21 | } | ||||||||||
| 22 | } | ||||||||||
| 23 | 0 | return undef; | |||||||||
| 24 | } | ||||||||||
| 25 | |||||||||||
| 26 | 11 | 1; | |||||||||