From b56e22deffc4a2e190b69d4e061561f86137b001 Mon Sep 17 00:00:00 2001 From: Darin McBride Date: Tue, 12 Jan 2016 22:33:58 -0700 Subject: [PATCH] Use lowest tile of SSL for determining costs. --- lib/Lacuna/DB/Result/Building/SSLa.pm | 8 ++++---- var/www/public/changes.txt | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/Lacuna/DB/Result/Building/SSLa.pm b/lib/Lacuna/DB/Result/Building/SSLa.pm index 5391abd7..31a4b9c6 100644 --- a/lib/Lacuna/DB/Result/Building/SSLa.pm +++ b/lib/Lacuna/DB/Result/Building/SSLa.pm @@ -129,8 +129,8 @@ has plan_time_cost => ( sub plan_time_at_level { my ($self, $level, $base) = @_; - my $inflate = INFLATION - (($self->level + $self->body->empire->effective_manufacturing_affinity * 5)/200); - my $time_cost = sprintf('%.0f', $base * ($inflate ** $level)); + my $inflate = INFLATION - (($self->max_level + $self->body->empire->effective_manufacturing_affinity * 5)/200); + my $time_cost = int($base * ($inflate ** $level)); $time_cost = 15 if ($time_cost < 15); $time_cost = 5184000 if ($time_cost > 5184000); return $time_cost; @@ -138,8 +138,8 @@ sub plan_time_at_level { sub plan_cost_at_level { my ($self, $level, $base) = @_; - my $inflate = INFLATION - (($self->level + $self->body->empire->effective_research_affinity * 5)/200); - my $cost = sprintf('%.0f', $base * ($inflate ** $level)); + my $inflate = INFLATION - (($self->max_level + $self->body->empire->effective_research_affinity * 5)/200); + my $cost = int($base * ($inflate ** $level)); return $cost; } diff --git a/var/www/public/changes.txt b/var/www/public/changes.txt index 7e0c72c0..e2b4791a 100644 --- a/var/www/public/changes.txt +++ b/var/www/public/changes.txt @@ -11,6 +11,7 @@ - Cht: /wiki replaces spaces with + so you can search for multiple words. - Cht: /planet is more forgiving for new players to use. - Fix: Renaming a planet changes top-right planet name. + - Fix: SSL resources and timers use lowest level of all tiles. 3.0917: - Fix: Recalc stats when building 1+x plans. -- 2.51.2