We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | } |
120 | 120 | |
121 | 121 | try { |
122 | - $TRADE_ROUTE =& $GLOBALS['TRADE_ROUTE']; |
|
122 | + $TRADE_ROUTE = & $GLOBALS['TRADE_ROUTE']; |
|
123 | 123 | debug('Action #' . $actions); |
124 | 124 | |
125 | 125 | //We have to reload player on each loop |
@@ -138,14 +138,14 @@ discard block |
||
138 | 138 | } |
139 | 139 | |
140 | 140 | if (!isset($TRADE_ROUTE)) { //We only want to change trade route if there isn't already one set. |
141 | - $TRADE_ROUTES =& findRoutes($player); |
|
142 | - $TRADE_ROUTE =& changeRoute($TRADE_ROUTES); |
|
141 | + $TRADE_ROUTES = & findRoutes($player); |
|
142 | + $TRADE_ROUTE = & changeRoute($TRADE_ROUTES); |
|
143 | 143 | } |
144 | 144 | |
145 | 145 | if ($player->isDead()) { |
146 | 146 | debug('Some evil person killed us, let\'s move on now.'); |
147 | 147 | $previousContainer = null; //We died, we don't care what we were doing beforehand. |
148 | - $TRADE_ROUTE =& changeRoute($TRADE_ROUTES); //Change route |
|
148 | + $TRADE_ROUTE = & changeRoute($TRADE_ROUTES); //Change route |
|
149 | 149 | processContainer(create_container('death_processing.php')); |
150 | 150 | } |
151 | 151 | if ($player->getNewbieTurns() <= NEWBIE_TURNS_WARNING_LIMIT && $player->getNewbieWarning()) { |
@@ -227,7 +227,7 @@ discard block |
||
227 | 227 | processContainer(tradeGoods($goodID, $player, $port)); |
228 | 228 | } else { |
229 | 229 | //Move to next route or fed. |
230 | - if (($TRADE_ROUTE =& changeRoute($TRADE_ROUTES)) === false) { |
|
230 | + if (($TRADE_ROUTE = & changeRoute($TRADE_ROUTES)) === false) { |
|
231 | 231 | debug('Changing Route Failed'); |
232 | 232 | processContainer(plotToFed($player)); |
233 | 233 | } else { |
@@ -254,7 +254,7 @@ discard block |
||
254 | 254 | processContainer(tradeGoods($goodID, $player, $port)); |
255 | 255 | } else { |
256 | 256 | //Move to next route or fed. |
257 | - if (($TRADE_ROUTE =& changeRoute($TRADE_ROUTES)) === false) { |
|
257 | + if (($TRADE_ROUTE = & changeRoute($TRADE_ROUTES)) === false) { |
|
258 | 258 | debug('Changing Route Failed'); |
259 | 259 | processContainer(plotToFed($player)); |
260 | 260 | } else { |
@@ -586,9 +586,9 @@ discard block |
||
586 | 586 | return $false; |
587 | 587 | } |
588 | 588 | $routeKey = array_rand($tradeRoutes); |
589 | - $tradeRoute =& $tradeRoutes[$routeKey]; |
|
589 | + $tradeRoute = & $tradeRoutes[$routeKey]; |
|
590 | 590 | unset($tradeRoutes[$routeKey]); |
591 | - $GLOBALS['TRADE_ROUTE'] =& $tradeRoute; |
|
591 | + $GLOBALS['TRADE_ROUTE'] = & $tradeRoute; |
|
592 | 592 | debug('Switched route', $tradeRoute); |
593 | 593 | return $tradeRoute; |
594 | 594 | } |
@@ -24,7 +24,7 @@ |
||
24 | 24 | continue; |
25 | 25 | } |
26 | 26 | $turns = min($attendeePlayer->getTurns() + $attendeePlayer->getTurnsGained(time(), true), |
27 | - $attendeePlayer->getMaxTurns()); |
|
27 | + $attendeePlayer->getMaxTurns()); |
|
28 | 28 | $oppers[$attendeePlayer->getPlayerName()] = $turns; |
29 | 29 | } |
30 | 30 |
@@ -314,7 +314,7 @@ discard block |
||
314 | 314 | while ($this->db->nextRecord()) { |
315 | 315 | try { |
316 | 316 | $otherPlayer = SmrPlayer::getPlayer($this->db->getInt('from_account_id'), |
317 | - $this->getGameID(), $forceUpdate); |
|
317 | + $this->getGameID(), $forceUpdate); |
|
318 | 318 | } catch (PlayerNotFoundException $e) { |
319 | 319 | // Skip players that have not joined this game |
320 | 320 | continue; |
@@ -878,9 +878,9 @@ discard block |
||
878 | 878 | */ |
879 | 879 | public function canFight() { |
880 | 880 | return !($this->hasNewbieTurns() || |
881 | - $this->isDead() || |
|
882 | - $this->isLandedOnPlanet() || |
|
883 | - $this->hasFederalProtection()); |
|
881 | + $this->isDead() || |
|
882 | + $this->isLandedOnPlanet() || |
|
883 | + $this->hasFederalProtection()); |
|
884 | 884 | } |
885 | 885 | |
886 | 886 | public function setDead($bool) { |
@@ -1703,7 +1703,7 @@ discard block |
||
1703 | 1703 | create_error('The saved sector must be in the box!'); |
1704 | 1704 | } |
1705 | 1705 | |
1706 | - $storedDestinations =& $this->getStoredDestinations(); |
|
1706 | + $storedDestinations = & $this->getStoredDestinations(); |
|
1707 | 1707 | foreach ($storedDestinations as &$sd) { |
1708 | 1708 | if ($sd['SectorID'] == $sectorID) { |
1709 | 1709 | $sd['OffsetTop'] = $offsetTop; |
@@ -2030,13 +2030,13 @@ discard block |
||
2030 | 2030 | $this->db->query('SELECT type,amount FROM player_hof WHERE ' . $this->SQL); |
2031 | 2031 | $this->HOF = array(); |
2032 | 2032 | while ($this->db->nextRecord()) { |
2033 | - $hof =& $this->HOF; |
|
2033 | + $hof = & $this->HOF; |
|
2034 | 2034 | $typeList = explode(':', $this->db->getField('type')); |
2035 | 2035 | foreach ($typeList as $type) { |
2036 | 2036 | if (!isset($hof[$type])) { |
2037 | 2037 | $hof[$type] = array(); |
2038 | 2038 | } |
2039 | - $hof =& $hof[$type]; |
|
2039 | + $hof = & $hof[$type]; |
|
2040 | 2040 | } |
2041 | 2041 | $hof = $this->db->getFloat('amount'); |
2042 | 2042 | } |
@@ -2115,8 +2115,8 @@ discard block |
||
2115 | 2115 | } |
2116 | 2116 | self::$HOFVis[$hofType] = $visibility; |
2117 | 2117 | |
2118 | - $hof =& $this->HOF; |
|
2119 | - $hofChanged =& $this->hasHOFChanged; |
|
2118 | + $hof = & $this->HOF; |
|
2119 | + $hofChanged = & $this->hasHOFChanged; |
|
2120 | 2120 | $new = false; |
2121 | 2121 | foreach ($typeList as $type) { |
2122 | 2122 | if (!isset($hofChanged[$type])) { |
@@ -2126,8 +2126,8 @@ discard block |
||
2126 | 2126 | $hof[$type] = array(); |
2127 | 2127 | $new = true; |
2128 | 2128 | } |
2129 | - $hof =& $hof[$type]; |
|
2130 | - $hofChanged =& $hofChanged[$type]; |
|
2129 | + $hof = & $hof[$type]; |
|
2130 | + $hofChanged = & $hofChanged[$type]; |
|
2131 | 2131 | } |
2132 | 2132 | if ($hofChanged == null) { |
2133 | 2133 | $hofChanged = self::HOF_CHANGED; |
@@ -2730,7 +2730,7 @@ discard block |
||
2730 | 2730 | } |
2731 | 2731 | |
2732 | 2732 | private function setupMissionStep($missionID) { |
2733 | - $mission =& $this->missions[$missionID]; |
|
2733 | + $mission = & $this->missions[$missionID]; |
|
2734 | 2734 | if ($mission['On Step'] >= count(MISSIONS[$missionID]['Steps'])) { |
2735 | 2735 | // Nothing to do if this mission is already completed |
2736 | 2736 | return; |
@@ -2779,7 +2779,7 @@ discard block |
||
2779 | 2779 | 'Starting Sector' => $this->getSectorID() |
2780 | 2780 | ); |
2781 | 2781 | |
2782 | - $this->missions[$missionID] =& $mission; |
|
2782 | + $this->missions[$missionID] = & $mission; |
|
2783 | 2783 | $this->setupMissionStep($missionID); |
2784 | 2784 | $this->rebuildMission($missionID); |
2785 | 2785 | |
@@ -2829,7 +2829,7 @@ discard block |
||
2829 | 2829 | |
2830 | 2830 | public function claimMissionReward($missionID) { |
2831 | 2831 | $this->getMissions(); |
2832 | - $mission =& $this->missions[$missionID]; |
|
2832 | + $mission = & $this->missions[$missionID]; |
|
2833 | 2833 | if ($mission === false) { |
2834 | 2834 | throw new Exception('Unknown mission: ' . $missionID); |
2835 | 2835 | } |
@@ -197,7 +197,7 @@ discard block |
||
197 | 197 | // If we can't shoot forces then just return a damageless array and don't waste resources calculated any damage mods. |
198 | 198 | return array('MaxDamage' => 0, 'Shield' => 0, 'Armour' => 0, 'Rollover' => $this->isDamageRollover()); |
199 | 199 | } |
200 | - $damage =& $this->getModifiedDamage(); |
|
200 | + $damage = & $this->getModifiedDamage(); |
|
201 | 201 | return $damage; |
202 | 202 | } |
203 | 203 | |
@@ -206,7 +206,7 @@ discard block |
||
206 | 206 | // If we can't shoot forces then just return a damageless array and don't waste resources calculated any damage mods. |
207 | 207 | return array('MaxDamage' => 0, 'Shield' => 0, 'Armour' => 0, 'Rollover' => $this->isDamageRollover()); |
208 | 208 | } |
209 | - $damage =& $this->getModifiedDamage(); |
|
209 | + $damage = & $this->getModifiedDamage(); |
|
210 | 210 | return $damage; |
211 | 211 | } |
212 | 212 | |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | // If we can't shoot forces then just return a damageless array and don't waste resources calculated any damage mods. |
216 | 216 | return array('MaxDamage' => 0, 'Shield' => 0, 'Armour' => 0, 'Rollover' => $this->isDamageRollover()); |
217 | 217 | } |
218 | - $damage =& $this->getModifiedDamage(); |
|
218 | + $damage = & $this->getModifiedDamage(); |
|
219 | 219 | |
220 | 220 | $planetMod = self::PLANET_DAMAGE_MOD; |
221 | 221 | $damage['MaxDamage'] = ICeil($damage['MaxDamage'] * $planetMod); |
@@ -235,7 +235,7 @@ discard block |
||
235 | 235 | $return = array('MaxDamage' => 0, 'Shield' => 0, 'Armour' => 0, 'Rollover' => $this->isDamageRollover()); |
236 | 236 | return $return; |
237 | 237 | } |
238 | - $damage =& $this->getModifiedDamage(); |
|
238 | + $damage = & $this->getModifiedDamage(); |
|
239 | 239 | return $damage; |
240 | 240 | } |
241 | 241 |
@@ -44,8 +44,8 @@ |
||
44 | 44 | */ |
45 | 45 | public function getValue() : int { |
46 | 46 | if ($this->rank == self::RANK_JACK || |
47 | - $this->rank == self::RANK_QUEEN || |
|
48 | - $this->rank == self::RANK_KING) { |
|
47 | + $this->rank == self::RANK_QUEEN || |
|
48 | + $this->rank == self::RANK_KING) { |
|
49 | 49 | return 10; |
50 | 50 | } elseif ($this->isAce()) { |
51 | 51 | return 11; |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | // If we can't shoot forces then just return a damageless array and don't waste resources calculated any damage mods. |
133 | 133 | return array('MaxDamage' => 0, 'Shield' => 0, 'Armour' => 0, 'Rollover' => $this->isDamageRollover()); |
134 | 134 | } |
135 | - $damage =& $this->getModifiedDamage(); |
|
135 | + $damage = & $this->getModifiedDamage(); |
|
136 | 136 | $damage['Launched'] = ICeil($this->getNumberOfCDs() * $this->getModifiedAccuracyAgainstForces($weaponPlayer, $forces) / 100); |
137 | 137 | $damage['Kamikaze'] = 0; |
138 | 138 | if ($weaponPlayer->isCombatDronesKamikazeOnMines()) { // If kamikaze then damage is same as MINE_ARMOUR |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | // If we can't shoot forces then just return a damageless array and don't waste resources calculated any damage mods. |
157 | 157 | return array('MaxDamage' => 0, 'Shield' => 0, 'Armour' => 0, 'Rollover' => $this->isDamageRollover()); |
158 | 158 | } |
159 | - $damage =& $this->getModifiedDamage(); |
|
159 | + $damage = & $this->getModifiedDamage(); |
|
160 | 160 | $damage['Launched'] = ICeil($this->getNumberOfCDs() * $this->getModifiedAccuracyAgainstPort($weaponPlayer, $port) / 100); |
161 | 161 | $damage['MaxDamage'] = ICeil($damage['Launched'] * $damage['MaxDamage']); |
162 | 162 | $damage['Shield'] = ICeil($damage['Launched'] * $damage['Shield']); |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | // If we can't shoot forces then just return a damageless array and don't waste resources calculated any damage mods. |
171 | 171 | return array('MaxDamage' => 0, 'Shield' => 0, 'Armour' => 0, 'Rollover' => $this->isDamageRollover()); |
172 | 172 | } |
173 | - $damage =& $this->getModifiedDamage(); |
|
173 | + $damage = & $this->getModifiedDamage(); |
|
174 | 174 | $damage['Launched'] = ICeil($this->getNumberOfCDs() * $this->getModifiedAccuracyAgainstPlanet($weaponPlayer, $planet) / 100); |
175 | 175 | $planetMod = self::PLANET_DAMAGE_MOD; |
176 | 176 | $damage['MaxDamage'] = ICeil($damage['Launched'] * $damage['MaxDamage'] * $planetMod); |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | $return = array('MaxDamage' => 0, 'Shield' => 0, 'Armour' => 0, 'Rollover' => $this->isDamageRollover()); |
186 | 186 | return $return; |
187 | 187 | } |
188 | - $damage =& $this->getModifiedDamage(); |
|
188 | + $damage = & $this->getModifiedDamage(); |
|
189 | 189 | if ($targetPlayer->getShip()->hasDCS()) { |
190 | 190 | $damage['MaxDamage'] *= DCS_PLAYER_DAMAGE_DECIMAL_PERCENT; |
191 | 191 | $damage['Shield'] *= DCS_PLAYER_DAMAGE_DECIMAL_PERCENT; |
@@ -203,7 +203,7 @@ discard block |
||
203 | 203 | $return = array('MaxDamage' => 0, 'Shield' => 0, 'Armour' => 0, 'Rollover' => $this->isDamageRollover()); |
204 | 204 | return $return; |
205 | 205 | } |
206 | - $damage =& $this->getModifiedDamage(); |
|
206 | + $damage = & $this->getModifiedDamage(); |
|
207 | 207 | |
208 | 208 | if ($targetPlayer->getShip()->hasDCS()) { |
209 | 209 | $damage['MaxDamage'] *= DCS_FORCE_DAMAGE_DECIMAL_PERCENT; |
@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | $return = array('MaxDamage' => 0, 'Shield' => 0, 'Armour' => 0, 'Rollover' => $this->isDamageRollover()); |
224 | 224 | return $return; |
225 | 225 | } |
226 | - $damage =& $this->getModifiedDamage(); |
|
226 | + $damage = & $this->getModifiedDamage(); |
|
227 | 227 | |
228 | 228 | if ($targetPlayer->getShip()->hasDCS()) { |
229 | 229 | $damage['MaxDamage'] *= DCS_PORT_DAMAGE_DECIMAL_PERCENT; |
@@ -242,7 +242,7 @@ discard block |
||
242 | 242 | $return = array('MaxDamage' => 0, 'Shield' => 0, 'Armour' => 0, 'Rollover' => $this->isDamageRollover()); |
243 | 243 | return $return; |
244 | 244 | } |
245 | - $damage =& $this->getModifiedDamage(); |
|
245 | + $damage = & $this->getModifiedDamage(); |
|
246 | 246 | |
247 | 247 | if ($targetPlayer->getShip()->hasDCS()) { |
248 | 248 | $damage['MaxDamage'] *= DCS_PLANET_DAMAGE_DECIMAL_PERCENT; |
@@ -857,14 +857,14 @@ |
||
857 | 857 | |
858 | 858 | public function isFederal() { |
859 | 859 | return $this->getShipTypeID() == SHIP_TYPE_FEDERAL_DISCOVERY || |
860 | - $this->getShipTypeID() == SHIP_TYPE_FEDERAL_WARRANT || |
|
861 | - $this->getShipTypeID() == SHIP_TYPE_FEDERAL_ULTIMATUM; |
|
860 | + $this->getShipTypeID() == SHIP_TYPE_FEDERAL_WARRANT || |
|
861 | + $this->getShipTypeID() == SHIP_TYPE_FEDERAL_ULTIMATUM; |
|
862 | 862 | } |
863 | 863 | |
864 | 864 | public function isUnderground() { |
865 | 865 | return $this->getShipTypeID() == SHIP_TYPE_THIEF || |
866 | - $this->getShipTypeID() == SHIP_TYPE_ASSASSIN || |
|
867 | - $this->getShipTypeID() == SHIP_TYPE_DEATH_CRUISER; |
|
866 | + $this->getShipTypeID() == SHIP_TYPE_ASSASSIN || |
|
867 | + $this->getShipTypeID() == SHIP_TYPE_DEATH_CRUISER; |
|
868 | 868 | } |
869 | 869 | |
870 | 870 | public function &shootPlayer(AbstractSmrPlayer $targetPlayer) { |
@@ -301,7 +301,7 @@ discard block |
||
301 | 301 | public function setWeaponLocations(array $orderArray) { |
302 | 302 | $weapons = $this->weapons; |
303 | 303 | foreach ($orderArray as $newOrder => $oldOrder) { |
304 | - $this->weapons[$newOrder] =& $weapons[$oldOrder]; |
|
304 | + $this->weapons[$newOrder] = & $weapons[$oldOrder]; |
|
305 | 305 | } |
306 | 306 | $this->hasChangedWeapons = true; |
307 | 307 | } |
@@ -901,14 +901,14 @@ discard block |
||
901 | 901 | } |
902 | 902 | $results['DeadBeforeShot'] = false; |
903 | 903 | foreach ($this->weapons as $orderID => $weapon) { |
904 | - $results['Weapons'][$orderID] =& $weapon->shootPlayer($thisPlayer, $targetPlayers[array_rand($targetPlayers)]); |
|
904 | + $results['Weapons'][$orderID] = & $weapon->shootPlayer($thisPlayer, $targetPlayers[array_rand($targetPlayers)]); |
|
905 | 905 | if ($results['Weapons'][$orderID]['Hit']) { |
906 | 906 | $results['TotalDamage'] += $results['Weapons'][$orderID]['ActualDamage']['TotalDamage']; |
907 | 907 | } |
908 | 908 | } |
909 | 909 | if ($this->hasCDs()) { |
910 | 910 | $thisCDs = new SmrCombatDrones($this->getGameID(), $this->getCDs()); |
911 | - $results['Drones'] =& $thisCDs->shootPlayer($thisPlayer, $targetPlayers[array_rand($targetPlayers)]); |
|
911 | + $results['Drones'] = & $thisCDs->shootPlayer($thisPlayer, $targetPlayers[array_rand($targetPlayers)]); |
|
912 | 912 | $results['TotalDamage'] += $results['Drones']['ActualDamage']['TotalDamage']; |
913 | 913 | } |
914 | 914 | $thisPlayer->increaseExperience(IRound($results['TotalDamage'] * self::EXP_PER_DAMAGE_PLAYER)); |
@@ -926,7 +926,7 @@ discard block |
||
926 | 926 | } |
927 | 927 | $results['DeadBeforeShot'] = false; |
928 | 928 | foreach ($this->weapons as $orderID => $weapon) { |
929 | - $results['Weapons'][$orderID] =& $weapon->shootForces($thisPlayer, $forces); |
|
929 | + $results['Weapons'][$orderID] = & $weapon->shootForces($thisPlayer, $forces); |
|
930 | 930 | if ($results['Weapons'][$orderID]['Hit']) { |
931 | 931 | $results['TotalDamage'] += $results['Weapons'][$orderID]['ActualDamage']['TotalDamage']; |
932 | 932 | $thisPlayer->increaseHOF($results['Weapons'][$orderID]['ActualDamage']['NumMines'], array('Combat', 'Forces', 'Mines', 'Killed'), HOF_PUBLIC); |
@@ -940,7 +940,7 @@ discard block |
||
940 | 940 | } |
941 | 941 | if ($this->hasCDs()) { |
942 | 942 | $thisCDs = new SmrCombatDrones($this->getGameID(), $this->getCDs()); |
943 | - $results['Drones'] =& $thisCDs->shootForces($thisPlayer, $forces); |
|
943 | + $results['Drones'] = & $thisCDs->shootForces($thisPlayer, $forces); |
|
944 | 944 | $results['TotalDamage'] += $results['Drones']['ActualDamage']['TotalDamage']; |
945 | 945 | $thisPlayer->increaseHOF($results['Drones']['ActualDamage']['NumMines'], array('Combat', 'Forces', 'Mines', 'Killed'), HOF_PUBLIC); |
946 | 946 | $thisPlayer->increaseHOF($results['Drones']['ActualDamage']['Mines'], array('Combat', 'Forces', 'Mines', 'Damage Done'), HOF_PUBLIC); |
@@ -965,14 +965,14 @@ discard block |
||
965 | 965 | } |
966 | 966 | $results['DeadBeforeShot'] = false; |
967 | 967 | foreach ($this->weapons as $orderID => $weapon) { |
968 | - $results['Weapons'][$orderID] =& $weapon->shootPort($thisPlayer, $port); |
|
968 | + $results['Weapons'][$orderID] = & $weapon->shootPort($thisPlayer, $port); |
|
969 | 969 | if ($results['Weapons'][$orderID]['Hit']) { |
970 | 970 | $results['TotalDamage'] += $results['Weapons'][$orderID]['ActualDamage']['TotalDamage']; |
971 | 971 | } |
972 | 972 | } |
973 | 973 | if ($this->hasCDs()) { |
974 | 974 | $thisCDs = new SmrCombatDrones($this->getGameID(), $this->getCDs()); |
975 | - $results['Drones'] =& $thisCDs->shootPort($thisPlayer, $port); |
|
975 | + $results['Drones'] = & $thisCDs->shootPort($thisPlayer, $port); |
|
976 | 976 | $results['TotalDamage'] += $results['Drones']['ActualDamage']['TotalDamage']; |
977 | 977 | } |
978 | 978 | $thisPlayer->increaseExperience(IRound($results['TotalDamage'] * self::EXP_PER_DAMAGE_PORT)); |
@@ -1003,14 +1003,14 @@ discard block |
||
1003 | 1003 | } |
1004 | 1004 | $results['DeadBeforeShot'] = false; |
1005 | 1005 | foreach ($this->weapons as $orderID => $weapon) { |
1006 | - $results['Weapons'][$orderID] =& $weapon->shootPlanet($thisPlayer, $planet, $delayed); |
|
1006 | + $results['Weapons'][$orderID] = & $weapon->shootPlanet($thisPlayer, $planet, $delayed); |
|
1007 | 1007 | if ($results['Weapons'][$orderID]['Hit']) { |
1008 | 1008 | $results['TotalDamage'] += $results['Weapons'][$orderID]['ActualDamage']['TotalDamage']; |
1009 | 1009 | } |
1010 | 1010 | } |
1011 | 1011 | if ($this->hasCDs()) { |
1012 | 1012 | $thisCDs = new SmrCombatDrones($this->getGameID(), $this->getCDs()); |
1013 | - $results['Drones'] =& $thisCDs->shootPlanet($thisPlayer, $planet, $delayed); |
|
1013 | + $results['Drones'] = & $thisCDs->shootPlanet($thisPlayer, $planet, $delayed); |
|
1014 | 1014 | $results['TotalDamage'] += $results['Drones']['ActualDamage']['TotalDamage']; |
1015 | 1015 | } |
1016 | 1016 | $thisPlayer->increaseExperience(IRound($results['TotalDamage'] * self::EXP_PER_DAMAGE_PLANET)); |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | foreach (\Globals::getGoods() as $goodId => $value) { |
94 | 94 | if ($goods[$goodId] === true) { |
95 | 95 | if ($sectors[$currentSectorId]->getPort()->getGoodTransaction($goodId) === self::GOOD_SELLS && |
96 | - $sectors[$targetSectorId]->getPort()->getGoodTransaction($goodId) === self::GOOD_BUYS) { |
|
96 | + $sectors[$targetSectorId]->getPort()->getGoodTransaction($goodId) === self::GOOD_BUYS) { |
|
97 | 97 | $rl[] = new OneWayRoute($currentSectorId, $targetSectorId, $raceID, $sectors[$targetSectorId]->getPort()->getRaceID(), $sectors[$currentSectorId]->getPort()->getGoodDistance($goodId), $sectors[$targetSectorId]->getPort()->getGoodDistance($goodId), $distance, $goodId); |
98 | 98 | } |
99 | 99 | } |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | foreach (\Globals::getGoods() as $goodId => $value) { |
122 | 122 | if ($goods[$goodId] === true) { |
123 | 123 | if ($sectors[$currentSectorId]->getPort()->getGoodTransaction($goodId) === self::GOOD_SELLS && |
124 | - $sectors[$targetSectorId]->getPort()->getGoodTransaction($goodId) === self::GOOD_BUYS) { |
|
124 | + $sectors[$targetSectorId]->getPort()->getGoodTransaction($goodId) === self::GOOD_BUYS) { |
|
125 | 125 | $owr = new OneWayRoute($currentSectorId, $targetSectorId, $sectors[$currentSectorId]->getPort()->getRaceID(), $sectors[$targetSectorId]->getPort()->getRaceID(), $sectors[$currentSectorId]->getPort()->getGoodDistance($goodId), $sectors[$targetSectorId]->getPort()->getGoodDistance($goodId), $distance, $goodId); |
126 | 126 | $fakeReturn = new OneWayRoute($targetSectorId, $currentSectorId, $sectors[$targetSectorId]->getPort()->getRaceID(), $sectors[$currentSectorId]->getPort()->getRaceID(), 0, 0, $distance, GOODS_NOTHING); |
127 | 127 | $mpr = new MultiplePortRoute($owr, $fakeReturn); |
@@ -80,7 +80,7 @@ |
||
80 | 80 | $return = array('MaxDamage' => 0, 'Shield' => 0, 'Armour' => 0, 'Rollover' => $this->isDamageRollover()); |
81 | 81 | return $return; |
82 | 82 | } |
83 | - $damage =& $this->getModifiedDamage(); |
|
83 | + $damage = & $this->getModifiedDamage(); |
|
84 | 84 | $damage['Launched'] = ICeil($this->getNumberOfSDs() * $this->getModifiedForceAccuracyAgainstPlayer($forces, $targetPlayer) / 100); |
85 | 85 | $damage['MaxDamage'] = ICeil($damage['Launched'] * $damage['MaxDamage']); |
86 | 86 | $damage['Shield'] = ICeil($damage['Launched'] * $damage['Shield']); |