diff --git a/lib/Lacuna/DB/Result/Spies.pm b/lib/Lacuna/DB/Result/Spies.pm index 29391b57..2a38fa86 100644 --- a/lib/Lacuna/DB/Result/Spies.pm +++ b/lib/Lacuna/DB/Result/Spies.pm @@ -468,10 +468,12 @@ sub run_mission { my $power = $self->offense + $self->$mission_skill; my $toughness = 0; my $defender = $self->get_defender; + my $hfa = 0; if (defined $defender) { $toughness = $defender->defense + $defender->$mission_skill; + $hfa = $defender->home_field_advantage; } - my $breakthru = ($power - $toughness - $defender->home_field_advantage) + $self->luck; + my $breakthru = ($power - $toughness - $hfa) + $self->luck; # handle outcomes and xp my $out; diff --git a/var/www/public/changes.txt b/var/www/public/changes.txt index 1f5f29a5..1c95a76c 100644 --- a/var/www/public/changes.txt +++ b/var/www/public/changes.txt @@ -10,6 +10,7 @@ - Fix: Police Station docs now show up under Modules instead of Buildings. - Fix: view_ships_orbiting will now return the ships that are orbiting your planet instead of just the count. - Fix: Fighters will return home after defending (instead of doubling the travel time). + - Fix: Fix defender's home field advantage. 3.0402 - API: Changed parliament propositions and laws to use email formatting rules.