diff --git a/docs/Parliament.pod b/docs/Parliament.pod index 7794f1ba..f4fd1472 100644 --- a/docs/Parliament.pod +++ b/docs/Parliament.pod @@ -247,13 +247,13 @@ A session id. The unique id of the parliament. -=head3 target_x, target_y +=head3 title -The C coordinates of the planet that is the target. +The name of the law. -=head3 reason +=head3 description -An explict reason why the BFG should be fired upon the target. Same rules as an L message body apply here. +A detailed description of what the law intends to promote or prohibit. Same rules as an L message body apply here. diff --git a/lib/Lacuna/DB/Result/Building/Module.pm b/lib/Lacuna/DB/Result/Building/Module.pm index e826eacb..27f6957b 100644 --- a/lib/Lacuna/DB/Result/Building/Module.pm +++ b/lib/Lacuna/DB/Result/Building/Module.pm @@ -59,7 +59,7 @@ before can_upgrade => sub { my $plan = $self->body->get_plan($self->class, $self->level + 1); if (defined $plan) { my $command = $self->body->command; - if ($command->level >= $self->level + 1 || $self->isa('Lacuna::DB::Result::Building::StationCommand')) { + if ($command->level >= $self->level + 1 || $self->isa('Lacuna::DB::Result::Building::Module::StationCommand')) { return 1; } else { diff --git a/lib/Lacuna/DB/Result/Map/Body/Planet.pm b/lib/Lacuna/DB/Result/Map/Body/Planet.pm index f9c996cf..5d7ede7d 100644 --- a/lib/Lacuna/DB/Result/Map/Body/Planet.pm +++ b/lib/Lacuna/DB/Result/Map/Body/Planet.pm @@ -234,7 +234,7 @@ around get_status => sub { $out->{happiness} = $self->happiness; $out->{happiness_hour} = $self->happiness_hour; } - elsif ($empire->alliance_id && $self->empire->alliance_id == $empire->alliance_id) { + if ($empire->alliance_id && $self->empire->alliance_id == $empire->alliance_id) { $out->{empire}{alignment} = $self->empire->is_isolationist ? 'ally-isolationist' : 'ally'; } } diff --git a/lib/Lacuna/DB/Result/Map/Body/Planet/Station.pm b/lib/Lacuna/DB/Result/Map/Body/Planet/Station.pm index a6777aa4..9b701105 100644 --- a/lib/Lacuna/DB/Result/Map/Body/Planet/Station.pm +++ b/lib/Lacuna/DB/Result/Map/Body/Planet/Station.pm @@ -26,7 +26,7 @@ has parliament => ( around get_status => sub { my ($orig, $self, $empire) = @_; - my $out = $orig->($self); + my $out = $orig->($self, $empire); if (defined $self->alliance) { $out->{alliance} = { id => $self->alliance->id, diff --git a/lib/Lacuna/DB/Result/Spies.pm b/lib/Lacuna/DB/Result/Spies.pm index 739fdc96..29391b57 100644 --- a/lib/Lacuna/DB/Result/Spies.pm +++ b/lib/Lacuna/DB/Result/Spies.pm @@ -520,7 +520,7 @@ sub run_security_sweep { if (defined $attacker) { $toughness = $attacker->offense + $attacker->$mission_skill; } - my $breakthru = ($power - $toughness - $self->home_field_advantage) + $self->luck; + my $breakthru = ($power - $toughness + $self->home_field_advantage) + $self->luck; # handle outcomes and xp my $out; diff --git a/t/Parliament.t b/t/Parliament.t index d9f9dbed..38586a5a 100644 --- a/t/Parliament.t +++ b/t/Parliament.t @@ -1,5 +1,5 @@ use lib '../lib'; -use Test::More tests => 17; +use Test::More tests => 20; use Test::Deep; use Data::Dumper; use 5.010; diff --git a/var/www/public/changes.txt b/var/www/public/changes.txt index d88eaac5..8f0fbb20 100644 --- a/var/www/public/changes.txt +++ b/var/www/public/changes.txt @@ -2,6 +2,12 @@ - API: Changed parliament propositions and laws to use email formatting rules. - Rule: Lagoons, Groves, and Sand now produce less because they were unbalancing. - Fix: Some of the new laws and propositions weren't being stored correctly. + - Fix: API documentation for propose_enact_writ(). + - Fix: Home field advantage crash. + - Fix: Was giving home field advantage to foreign spies on security sweep. + - Fix: Alignment flag was set wrong for ring indicator on space stations. + - Fix: After the 3.0400 update Space Stations don't return *_hour, *_capacity, *_stored (e.g. water_hour, food_capacity, energy_stored), happiness, and building_count. + - Fix: Space station command upgrade error. 3.0401 - API: Slightly changed propose_fire_bfg().