diff --git a/lib/Lacuna/DB/Result/Empire.pm b/lib/Lacuna/DB/Result/Empire.pm index a30c7a01..3d39b797 100644 --- a/lib/Lacuna/DB/Result/Empire.pm +++ b/lib/Lacuna/DB/Result/Empire.pm @@ -905,11 +905,9 @@ sub next_colony_cost { { type=> { in => [qw(colony_ship short_range_colony_ship space_station)]}, task=>'travelling', direction=>'out', 'body.empire_id' => $self->id}, { join => 'body' } )->count; - my $inflation = INFLATION - ($self->growth_affinity / 100); - my $tally = 100_000; - for (2..$count) { - $tally += $tally * $inflation; - } +# my $inflation = 1 + INFLATION - ($self->growth_affinity * 5 / 100); Future Enhancement to make Growth more worth it. + my $inflation = 1 + INFLATION - ($self->growth_affinity / 100); + my $tally = 100_000 * ($inflation**($count-1)); return sprintf('%.0f', $tally); } diff --git a/lib/Lacuna/RPC/Building/BlackHoleGenerator.pm b/lib/Lacuna/RPC/Building/BlackHoleGenerator.pm index f12ed782..75e66351 100644 --- a/lib/Lacuna/RPC/Building/BlackHoleGenerator.pm +++ b/lib/Lacuna/RPC/Building/BlackHoleGenerator.pm @@ -887,7 +887,7 @@ sub qualify_moving_sys { } } } - if ($body->get_buildings_of_class('Lacuna::DB::Result::Building::Permanent::Fissure')) { + if ($body->get_type ne 'asteroid' and $body->get_buildings_of_class('Lacuna::DB::Result::Building::Permanent::Fissure')) { confess [1009, 'You can not move a body with a fissure on it.']; } } @@ -1032,10 +1032,6 @@ sub bhg_swap { star_id => $new_data->{star_id}, orbit => $new_data->{orbit}, }); - my $boracle = $body->get_building_of_class('Lacuna::DB::Result::Building::Permanent::OracleOfAnid'); - if ($boracle) { - $boracle->recalc_probes; - } unless ($new_data->{type} eq "empty") { $target->update({ @@ -1110,6 +1106,10 @@ sub bhg_swap { if ($body->get_type eq 'space station') { drop_stars_beyond_range($body); } + my $boracle = $body->get_building_of_class('Lacuna::DB::Result::Building::Permanent::OracleOfAnid'); + if ($boracle) { + $boracle->recalc_probes; + } } if (defined($body->empire)) { my $mbody = Lacuna->db @@ -1991,7 +1991,7 @@ sub bhg_tasks { reason => "Target action by Star.", occupied => 0, min_level => 30, - range => 5 * $blevel, + range => 8 * $blevel, recovery => int($day_sec * 1200/$blevel), waste_cost => 30_000_000_000, base_fail => 60,