| 1 | package BalanceOfPower::Commands::DiplomaticPressure; | ||||||||||
| 2 | 11 | $BalanceOfPower::Commands::DiplomaticPressure::VERSION = '0.200000'; | |||||||||
| 3 | 11 | ▶ | use Moo; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | |||||||||||
| 5 | 11 | extends 'BalanceOfPower::Commands::TargetNation'; | |||||||||
| 6 | |||||||||||
| 7 | sub get_available_targets | ||||||||||
| 8 | { | ||||||||||
| 9 | 0 | ▶ | my $self = shift; | ||||||||
|
Subroutine
get_available_targets: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||
| 10 | 0 | my @targets = $self->SUPER::get_available_targets(); | |||||||||
| 11 | 0 | my $nation = $self->actor; | |||||||||
| 12 | 0 | ▶ | @targets = grep { (! $self->world->is_under_influence($_) | ||||||||
|
Branch: 1 branch
| |||||||||||
| 13 | || $self->world->is_under_influence($_) ne $nation) } @targets; | ||||||||||
| 14 | 0 | return @targets; | |||||||||
| 15 | } | ||||||||||
| 16 | |||||||||||
| 17 | |||||||||||
| 18 | sub IA | ||||||||||
| 19 | { | ||||||||||
| 20 | 7 | ▶ | my $self = shift; | ||||||||
|
Subroutine
IA: called CC=2 SCAR=6.9
Pod
undocumented
| |||||||||||
| 21 | 7 | my $actor = $self->get_nation(); | |||||||||
| 22 | 7 | my @hates = $self->world->shuffle("Choosing target for diplomatic pressure for ". $self->actor, $self->world->get_nations_with_status($self->actor, ['HATE'])); | |||||||||
| 23 | 7 | ▶ | if(@hates) | ||||||||
|
Branch: 1 branch
| |||||||||||
| 24 | { | ||||||||||
| 25 | 6 | return "DIPLOMATIC PRESSURE ON " . $hates[0]; | |||||||||
| 26 | } | ||||||||||
| 27 | else | ||||||||||
| 28 | { | ||||||||||
| 29 | 1 | return undef; | |||||||||
| 30 | } | ||||||||||
| 31 | } | ||||||||||
| 32 | 11 | 1; | |||||||||