diff --git a/lib/Lacuna/RPC/Building/SpacePort.pm b/lib/Lacuna/RPC/Building/SpacePort.pm index f2267570..5d4be8c2 100644 --- a/lib/Lacuna/RPC/Building/SpacePort.pm +++ b/lib/Lacuna/RPC/Building/SpacePort.pm @@ -328,7 +328,7 @@ sub send_fleet { $set_speed //= 0; my $empire = $self->get_empire_by_session($session_id); my $target = $self->find_target($target_params); - my $max_ships = Lacuna->config->get('ships_per_fleet') || 50; + my $max_ships = Lacuna->config->get('ships_per_fleet') || 20; if (@$ship_ids > $max_ships) { confess [1009, 'Too many ships for a fleet.']; } -- 2.51.2 From 29df456996f7eb7d5a813c3231fd9b39500609df Mon Sep 17 00:00:00 2001 From: lemming552 Date: Tue, 12 Jun 2012 12:37:28 -0600 Subject: [PATCH 2/3] Spies being burned cost happy, training slightly cheaper. --- lib/Lacuna.pm | 2 +- lib/Lacuna/DB/Result/Building/Intelligence.pm | 3 ++- lib/Lacuna/DB/Result/Spies.pm | 12 ++++++++---- var/www/public/changes.txt | 4 ++++ 4 files changed, 15 insertions(+), 6 deletions(-) diff --git a/lib/Lacuna.pm b/lib/Lacuna.pm index 93891ec1..37b007d6 100644 --- a/lib/Lacuna.pm +++ b/lib/Lacuna.pm @@ -7,7 +7,7 @@ use Config::JSON; useall __PACKAGE__; -our $VERSION = 3.0854; +our $VERSION = 3.0855; my $config = Config::JSON->new('/data/Lacuna-Server/etc/lacuna.conf'); my $db = Lacuna::DB->connect($config->get('db/dsn'),$config->get('db/username'),$config->get('db/password'), { mysql_enable_utf8 => 1}); diff --git a/lib/Lacuna/DB/Result/Building/Intelligence.pm b/lib/Lacuna/DB/Result/Building/Intelligence.pm index a005b729..1bc52b7e 100644 --- a/lib/Lacuna/DB/Result/Building/Intelligence.pm +++ b/lib/Lacuna/DB/Result/Building/Intelligence.pm @@ -124,7 +124,8 @@ has training_multiplier => ( lazy => 1, default => sub { my $self = shift; - my $multiplier = $self->level +# my $multiplier = $self->level + my $multiplier = 1 - $self->body->empire->deception_affinity + $self->espionage_level + $self->security_level; diff --git a/lib/Lacuna/DB/Result/Spies.pm b/lib/Lacuna/DB/Result/Spies.pm index 833c0343..5dba7ff5 100644 --- a/lib/Lacuna/DB/Result/Spies.pm +++ b/lib/Lacuna/DB/Result/Spies.pm @@ -380,10 +380,14 @@ sub burn { my $self = shift; my $old_empire = $self->empire; my $body = $self->from_body; - if ($body->add_news(10, 'This reporter has just learned that %s has a policy of burning its own loyal spies.', $old_empire->name)) { - $body->spend_happiness(5000); - $body->update; - } + my $unhappy = int($self->level * 1000 * 200/75); # Not factoring in Deception, always costs this much happiness. + $unhappy = 2000 if ($unhappy < 2000); + $body->spend_happiness($unhappy); + if ($body->add_news(25, 'This reporter has just learned that %s has a policy of burning its own loyal spies.', $old_empire->name)) { +# If the media finds out, even more unhappy. + $body->spend_happiness(int($unhappy/2)); + } + $body->update; if ($self->on_body->empire_id != $old_empire->id) { if (randint(1,100) < $self->level) { my $new_empire = $self->on_body->empire; diff --git a/var/www/public/changes.txt b/var/www/public/changes.txt index fe8880e7..fe0b3240 100644 --- a/var/www/public/changes.txt +++ b/var/www/public/changes.txt @@ -1,3 +1,7 @@ +3.0855: + - Mod: Intelligence Building Level doesn't factor into training costs. + - Mod: Burning a spy has more consequences. + 3.0854: - Add: Backend support only for fleet actions. No changes to gameplay at this time. - Fix: None-permanent buildings on abandoned planets have been cleared. -- 2.51.2 From f41b6e45d0ede3e8c088a70808c9583d1682a0d9 Mon Sep 17 00:00:00 2001 From: ian docherty Date: Tue, 12 Jun 2012 15:56:05 -0400 Subject: [PATCH 3/3] Possible fix for SS that self destruct --- lib/Lacuna/DB/Result/Map/Body.pm | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/lib/Lacuna/DB/Result/Map/Body.pm b/lib/Lacuna/DB/Result/Map/Body.pm index 9a39154e..386f8b3e 100644 --- a/lib/Lacuna/DB/Result/Map/Body.pm +++ b/lib/Lacuna/DB/Result/Map/Body.pm @@ -233,14 +233,12 @@ has building_cache => ( sub _build_building_cache { my ($self) = @_; - my @buildings_cache = $self->_buildings; - my @buildings; - for my $building (@buildings_cache) { -# push @buildings, weaken($building); - push @buildings, $building; + my $buildings = []; + my $bld_rs = $self->_buildings->search({},{prefetch => 'body'}); + while (my $building = $bld_rs->next) { + push @$buildings, $building; } - - return \@buildings; + return $buildings; } sub building_max_level {