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) { |
@@ -310,7 +310,7 @@ discard block |
||
| 310 | 310 | public function setWeaponLocations(array $orderArray) { |
| 311 | 311 | $weapons = $this->weapons; |
| 312 | 312 | foreach ($orderArray as $newOrder => $oldOrder) { |
| 313 | - $this->weapons[$newOrder] =& $weapons[$oldOrder]; |
|
| 313 | + $this->weapons[$newOrder] = & $weapons[$oldOrder]; |
|
| 314 | 314 | } |
| 315 | 315 | $this->hasChangedWeapons = true; |
| 316 | 316 | } |
@@ -939,14 +939,14 @@ discard block |
||
| 939 | 939 | } |
| 940 | 940 | $results['DeadBeforeShot'] = false; |
| 941 | 941 | foreach ($this->weapons as $orderID => $weapon) { |
| 942 | - $results['Weapons'][$orderID] =& $weapon->shootPlayer($thisPlayer, array_rand_value($targetPlayers)); |
|
| 942 | + $results['Weapons'][$orderID] = & $weapon->shootPlayer($thisPlayer, array_rand_value($targetPlayers)); |
|
| 943 | 943 | if ($results['Weapons'][$orderID]['Hit']) { |
| 944 | 944 | $results['TotalDamage'] += $results['Weapons'][$orderID]['ActualDamage']['TotalDamage']; |
| 945 | 945 | } |
| 946 | 946 | } |
| 947 | 947 | if ($this->hasCDs()) { |
| 948 | 948 | $thisCDs = new SmrCombatDrones($this->getGameID(), $this->getCDs()); |
| 949 | - $results['Drones'] =& $thisCDs->shootPlayer($thisPlayer, array_rand_value($targetPlayers)); |
|
| 949 | + $results['Drones'] = & $thisCDs->shootPlayer($thisPlayer, array_rand_value($targetPlayers)); |
|
| 950 | 950 | $results['TotalDamage'] += $results['Drones']['ActualDamage']['TotalDamage']; |
| 951 | 951 | } |
| 952 | 952 | $thisPlayer->increaseExperience(IRound($results['TotalDamage'] * self::EXP_PER_DAMAGE_PLAYER)); |
@@ -964,7 +964,7 @@ discard block |
||
| 964 | 964 | } |
| 965 | 965 | $results['DeadBeforeShot'] = false; |
| 966 | 966 | foreach ($this->weapons as $orderID => $weapon) { |
| 967 | - $results['Weapons'][$orderID] =& $weapon->shootForces($thisPlayer, $forces); |
|
| 967 | + $results['Weapons'][$orderID] = & $weapon->shootForces($thisPlayer, $forces); |
|
| 968 | 968 | if ($results['Weapons'][$orderID]['Hit']) { |
| 969 | 969 | $results['TotalDamage'] += $results['Weapons'][$orderID]['ActualDamage']['TotalDamage']; |
| 970 | 970 | $thisPlayer->increaseHOF($results['Weapons'][$orderID]['ActualDamage']['NumMines'], array('Combat', 'Forces', 'Mines', 'Killed'), HOF_PUBLIC); |
@@ -978,7 +978,7 @@ discard block |
||
| 978 | 978 | } |
| 979 | 979 | if ($this->hasCDs()) { |
| 980 | 980 | $thisCDs = new SmrCombatDrones($this->getGameID(), $this->getCDs()); |
| 981 | - $results['Drones'] =& $thisCDs->shootForces($thisPlayer, $forces); |
|
| 981 | + $results['Drones'] = & $thisCDs->shootForces($thisPlayer, $forces); |
|
| 982 | 982 | $results['TotalDamage'] += $results['Drones']['ActualDamage']['TotalDamage']; |
| 983 | 983 | $thisPlayer->increaseHOF($results['Drones']['ActualDamage']['NumMines'], array('Combat', 'Forces', 'Mines', 'Killed'), HOF_PUBLIC); |
| 984 | 984 | $thisPlayer->increaseHOF($results['Drones']['ActualDamage']['Mines'], array('Combat', 'Forces', 'Mines', 'Damage Done'), HOF_PUBLIC); |
@@ -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->shootPort($thisPlayer, $port); |
|
| 1006 | + $results['Weapons'][$orderID] = & $weapon->shootPort($thisPlayer, $port); |
|
| 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->shootPort($thisPlayer, $port); |
|
| 1013 | + $results['Drones'] = & $thisCDs->shootPort($thisPlayer, $port); |
|
| 1014 | 1014 | $results['TotalDamage'] += $results['Drones']['ActualDamage']['TotalDamage']; |
| 1015 | 1015 | } |
| 1016 | 1016 | $thisPlayer->increaseExperience(IRound($results['TotalDamage'] * self::EXP_PER_DAMAGE_PORT)); |
@@ -1041,14 +1041,14 @@ discard block |
||
| 1041 | 1041 | } |
| 1042 | 1042 | $results['DeadBeforeShot'] = false; |
| 1043 | 1043 | foreach ($this->weapons as $orderID => $weapon) { |
| 1044 | - $results['Weapons'][$orderID] =& $weapon->shootPlanet($thisPlayer, $planet, $delayed); |
|
| 1044 | + $results['Weapons'][$orderID] = & $weapon->shootPlanet($thisPlayer, $planet, $delayed); |
|
| 1045 | 1045 | if ($results['Weapons'][$orderID]['Hit']) { |
| 1046 | 1046 | $results['TotalDamage'] += $results['Weapons'][$orderID]['ActualDamage']['TotalDamage']; |
| 1047 | 1047 | } |
| 1048 | 1048 | } |
| 1049 | 1049 | if ($this->hasCDs()) { |
| 1050 | 1050 | $thisCDs = new SmrCombatDrones($this->getGameID(), $this->getCDs()); |
| 1051 | - $results['Drones'] =& $thisCDs->shootPlanet($thisPlayer, $planet, $delayed); |
|
| 1051 | + $results['Drones'] = & $thisCDs->shootPlanet($thisPlayer, $planet, $delayed); |
|
| 1052 | 1052 | $results['TotalDamage'] += $results['Drones']['ActualDamage']['TotalDamage']; |
| 1053 | 1053 | } |
| 1054 | 1054 | $thisPlayer->increaseExperience(IRound($results['TotalDamage'] * self::EXP_PER_DAMAGE_PLANET)); |
@@ -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']); |
@@ -100,16 +100,16 @@ |
||
| 100 | 100 | $container['view_game_id'] = $var['view_game_id']; |
| 101 | 101 | $container['game_name'] = $var['game_name']; |
| 102 | 102 | $menuItems[] = ['Link' => SmrSession::getNewHREF($container), |
| 103 | - 'Text' => 'Game Details']; |
|
| 103 | + 'Text' => 'Game Details']; |
|
| 104 | 104 | $container['body'] = 'history_games_detail.php'; |
| 105 | 105 | $menuItems[] = ['Link' => SmrSession::getNewHREF($container), |
| 106 | - 'Text' => 'Extended Stats']; |
|
| 106 | + 'Text' => 'Extended Stats']; |
|
| 107 | 107 | $container['body'] = 'history_games_hof.php'; |
| 108 | 108 | $menuItems[] = ['Link' => SmrSession::getNewHREF($container), |
| 109 | - 'Text' => 'Hall of Fame']; |
|
| 109 | + 'Text' => 'Hall of Fame']; |
|
| 110 | 110 | $container['body'] = 'history_games_news.php'; |
| 111 | 111 | $menuItems[] = ['Link' => SmrSession::getNewHREF($container), |
| 112 | - 'Text' => 'Game News']; |
|
| 112 | + 'Text' => 'Game News']; |
|
| 113 | 113 | // make the selected index bold |
| 114 | 114 | $boldItem =& $menuItems[$selected_index]['Text']; |
| 115 | 115 | $boldItem = '<b>' . $boldItem . '</b>'; |
@@ -12,7 +12,7 @@ discard block |
||
| 12 | 12 | $menuItems[] = array('Link'=>Globals::getPlanetListHREF($alliance_id), 'Text'=>'Defense'); |
| 13 | 13 | $menuItems[] = array('Link'=>Globals::getPlanetListFinancialHREF($alliance_id), 'Text'=>'Financial'); |
| 14 | 14 | // make the selected index bold |
| 15 | - $boldItem =& $menuItems[$selected_index]['Text']; |
|
| 15 | + $boldItem = & $menuItems[$selected_index]['Text']; |
|
| 16 | 16 | $boldItem = '<span class="bold">' . $boldItem . '</span>'; |
| 17 | 17 | $template->assign('MenuItems', $menuItems); |
| 18 | 18 | } |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | $menuItems[] = ['Link' => SmrSession::getNewHREF($container), |
| 108 | 108 | 'Text' => 'Game News']; |
| 109 | 109 | // make the selected index bold |
| 110 | - $boldItem =& $menuItems[$selected_index]['Text']; |
|
| 110 | + $boldItem = & $menuItems[$selected_index]['Text']; |
|
| 111 | 111 | $boldItem = '<b>' . $boldItem . '</b>'; |
| 112 | 112 | $template->assign('MenuItems', $menuItems); |
| 113 | 113 | } |