diff --git a/lib/Lacuna/AI.pm b/lib/Lacuna/AI.pm index 03f9f256..6e19636b 100644 --- a/lib/Lacuna/AI.pm +++ b/lib/Lacuna/AI.pm @@ -359,11 +359,13 @@ sub train_spies { my $max_spies = $intelligence->level * 3; my $room_for = $max_spies - $spies; my $train_count = 0; + say " Training $room_for spies for total of $max_spies with chance of $chance"; if ($subsidise) { + say " Subsidizing"; my $deception = $colony->empire->effective_deception_affinity * 50; while ($train_count < $room_for) { $train_count++; - next if (rand(100) < $chance); + next if ($chance < rand(100)); # bypass everything and just create the spy my $spy = Lacuna->db->resultset('Lacuna::DB::Result::Spies')->new({ from_body_id => $colony->id, diff --git a/var/www/public/changes.txt b/var/www/public/changes.txt index 303488c3..4e5cfbea 100644 --- a/var/www/public/changes.txt +++ b/var/www/public/changes.txt @@ -1,6 +1,7 @@ 3.0914: - UI : Evein draining re-added. - Fix: Effective level could be too high. + - Fix: AI have a better chance to train a spy. 3.0913: - Add: Insurrect Value & SRCS happiness cost added to PCC output.