Skip to content

Commit

Permalink
GH-131 Fix rapid fire distribution by correctly resetting total targe…
Browse files Browse the repository at this point in the history
…t ships counter

(now ships can utilite full rapid fire potential, because previously "left-over shots" could
have been wasted when being added to just one target user, where these shots should have been
distributed better between other users in the first place)
  • Loading branch information
mdziekon committed Nov 14, 2020
1 parent 6016222 commit 38c1189
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions includes/CombatEngineAres.php
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,7 @@ function Combat($Attacker, $Defender, $AttackerTech, $DefenderTech, $UseRapidFir
}
if(isset($DefShipsTypes[$TShip]) && $DefShipsTypes[$TShip] > 0)
{
$TShipTotalCount = 0;
$TotalForceNeed = 0;
$TotalShootsNeed = 0;
$GainedForce = 0;
Expand Down Expand Up @@ -908,6 +909,7 @@ function Combat($Attacker, $Defender, $AttackerTech, $DefenderTech, $UseRapidFir
}
if(isset($AtkShipsTypes[$TShip]) && $AtkShipsTypes[$TShip] > 0)
{
$TShipTotalCount = 0;
$TotalForceNeed = 0;
$TotalShootsNeed = 0;
$GainedForce = 0;
Expand Down

0 comments on commit 38c1189

Please sign in to comment.