We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -12,13 +12,13 @@ discard block |
||
12 | 12 | } |
13 | 13 | if (isset($PlanetCombatResults['Weapons']) && is_array($PlanetCombatResults['Weapons'])) { |
14 | 14 | foreach ($PlanetCombatResults['Weapons'] as $WeaponResults) { |
15 | - $ShootingWeapon =& $WeaponResults['Weapon']; |
|
16 | - $ShotHit =& $WeaponResults['Hit']; |
|
17 | - $ActualDamage =& $WeaponResults['ActualDamage']; |
|
18 | - $WeaponDamage =& $WeaponResults['WeaponDamage']; |
|
19 | - $TargetPlayer =& $WeaponResults['TargetPlayer']; |
|
15 | + $ShootingWeapon = & $WeaponResults['Weapon']; |
|
16 | + $ShotHit = & $WeaponResults['Hit']; |
|
17 | + $ActualDamage = & $WeaponResults['ActualDamage']; |
|
18 | + $WeaponDamage = & $WeaponResults['WeaponDamage']; |
|
19 | + $TargetPlayer = & $WeaponResults['TargetPlayer']; |
|
20 | 20 | |
21 | - echo $CombatPlanet->getCombatName() ?> fires a <?php echo $ShootingWeapon->getName(); ?> at <?php if ($ShotHit && $ActualDamage['TargetAlreadyDead']){ ?> the debris that was once <?php } echo $TargetPlayer->getDisplayName(); |
|
21 | + echo $CombatPlanet->getCombatName() ?> fires a <?php echo $ShootingWeapon->getName(); ?> at <?php if ($ShotHit && $ActualDamage['TargetAlreadyDead']) { ?> the debris that was once <?php } echo $TargetPlayer->getDisplayName(); |
|
22 | 22 | if (!$ShotHit || !$ActualDamage['TargetAlreadyDead']) { |
23 | 23 | if (!$ShotHit) { |
24 | 24 | ?> and misses<?php |
@@ -37,9 +37,9 @@ discard block |
||
37 | 37 | } else { |
38 | 38 | ?> destroying <?php |
39 | 39 | $DamageTypes = 0; |
40 | - if ($ActualDamage['Shield'] > 0){ $DamageTypes = $DamageTypes+1; } |
|
41 | - if ($ActualDamage['NumCDs'] > 0){ $DamageTypes = $DamageTypes+1; } |
|
42 | - if ($ActualDamage['Armour'] > 0){ $DamageTypes = $DamageTypes+1; } |
|
40 | + if ($ActualDamage['Shield'] > 0) { $DamageTypes = $DamageTypes + 1; } |
|
41 | + if ($ActualDamage['NumCDs'] > 0) { $DamageTypes = $DamageTypes + 1; } |
|
42 | + if ($ActualDamage['Armour'] > 0) { $DamageTypes = $DamageTypes + 1; } |
|
43 | 43 | |
44 | 44 | if ($ActualDamage['Shield'] > 0) { |
45 | 45 | ?><span class="shields"><?php echo number_format($ActualDamage['Shield']); ?></span> shields<?php |
@@ -56,25 +56,25 @@ discard block |
||
56 | 56 | } ?>. |
57 | 57 | <br /><?php |
58 | 58 | if ($ShotHit && $ActualDamage['KillingShot']) { |
59 | - $this->includeTemplate('includes/TraderCombatKillMessage.inc.php',array('KillResults'=>$WeaponResults['KillResults'],'TargetPlayer'=>$TargetPlayer)); |
|
59 | + $this->includeTemplate('includes/TraderCombatKillMessage.inc.php', array('KillResults'=>$WeaponResults['KillResults'], 'TargetPlayer'=>$TargetPlayer)); |
|
60 | 60 | } |
61 | 61 | } |
62 | 62 | } |
63 | 63 | if (isset($PlanetCombatResults['Drones'])) { |
64 | - $Drones =& $PlanetCombatResults['Drones']; |
|
65 | - $ActualDamage =& $Drones['ActualDamage']; |
|
66 | - $WeaponDamage =& $Drones['WeaponDamage']; |
|
67 | - $TargetPlayer =& $Drones['TargetPlayer']; |
|
64 | + $Drones = & $PlanetCombatResults['Drones']; |
|
65 | + $ActualDamage = & $Drones['ActualDamage']; |
|
66 | + $WeaponDamage = & $Drones['WeaponDamage']; |
|
67 | + $TargetPlayer = & $Drones['TargetPlayer']; |
|
68 | 68 | $DamageTypes = 0; |
69 | - if ($ActualDamage['Shield'] > 0){ $DamageTypes = $DamageTypes+1; } |
|
70 | - if ($ActualDamage['NumCDs'] > 0){ $DamageTypes = $DamageTypes+1; } |
|
71 | - if ($ActualDamage['Armour'] > 0){ $DamageTypes = $DamageTypes+1; } |
|
69 | + if ($ActualDamage['Shield'] > 0) { $DamageTypes = $DamageTypes + 1; } |
|
70 | + if ($ActualDamage['NumCDs'] > 0) { $DamageTypes = $DamageTypes + 1; } |
|
71 | + if ($ActualDamage['Armour'] > 0) { $DamageTypes = $DamageTypes + 1; } |
|
72 | 72 | |
73 | 73 | echo $CombatPlanet->getCombatName(); |
74 | 74 | if ($WeaponDamage['Launched'] == 0) { |
75 | 75 | ?> fails to launch it's combat drones<?php |
76 | 76 | } else { |
77 | - ?> launches <span class="cds"><?php echo $WeaponDamage['Launched'] ?></span> combat drones at <?php if ($ActualDamage['TargetAlreadyDead']){ ?>the debris that was once <?php } echo $TargetPlayer->getDisplayName(); |
|
77 | + ?> launches <span class="cds"><?php echo $WeaponDamage['Launched'] ?></span> combat drones at <?php if ($ActualDamage['TargetAlreadyDead']) { ?>the debris that was once <?php } echo $TargetPlayer->getDisplayName(); |
|
78 | 78 | if (!$ActualDamage['TargetAlreadyDead']) { |
79 | 79 | if ($ActualDamage['TotalDamage'] == 0) { |
80 | 80 | if ($WeaponDamage['Shield'] > 0) { |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | } ?>. |
107 | 107 | <br /><?php |
108 | 108 | if ($ActualDamage['KillingShot']) { |
109 | - $this->includeTemplate('includes/TraderCombatKillMessage.inc.php',array('KillResults'=>$Drones['KillResults'],'TargetPlayer'=>$TargetPlayer)); |
|
109 | + $this->includeTemplate('includes/TraderCombatKillMessage.inc.php', array('KillResults'=>$Drones['KillResults'], 'TargetPlayer'=>$TargetPlayer)); |
|
110 | 110 | } |
111 | 111 | } |
112 | 112 |
@@ -1,19 +1,19 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | if (is_array($TraderTeamCombatResults['Traders'])) { |
3 | 3 | foreach ($TraderTeamCombatResults['Traders'] as $AccountID => $TraderResults) { |
4 | - $ShootingPlayer =& $TraderResults['Player']; |
|
5 | - $TotalDamage =& $TraderResults['TotalDamage']; |
|
4 | + $ShootingPlayer = & $TraderResults['Player']; |
|
5 | + $TotalDamage = & $TraderResults['TotalDamage']; |
|
6 | 6 | |
7 | 7 | if ($TraderResults['DeadBeforeShot']) { |
8 | 8 | echo $ShootingPlayer->getDisplayName() ?> died before they were able to attack!<br /><?php |
9 | 9 | } else { |
10 | 10 | if (isset($TraderResults['Weapons']) && is_array($TraderResults['Weapons'])) { |
11 | 11 | foreach ($TraderResults['Weapons'] as $WeaponResults) { |
12 | - $ShootingWeapon =& $WeaponResults['Weapon']; |
|
13 | - $ShotHit =& $WeaponResults['Hit']; |
|
14 | - $ActualDamage =& $WeaponResults['ActualDamage']; |
|
15 | - $WeaponDamage =& $WeaponResults['WeaponDamage']; |
|
16 | - $TargetPlayer =& $WeaponResults['TargetPlayer']; |
|
12 | + $ShootingWeapon = & $WeaponResults['Weapon']; |
|
13 | + $ShotHit = & $WeaponResults['Hit']; |
|
14 | + $ActualDamage = & $WeaponResults['ActualDamage']; |
|
15 | + $WeaponDamage = & $WeaponResults['WeaponDamage']; |
|
16 | + $TargetPlayer = & $WeaponResults['TargetPlayer']; |
|
17 | 17 | |
18 | 18 | echo $ShootingPlayer->getDisplayName() ?> fires their <?php echo $ShootingWeapon->getName() ?> at <?php |
19 | 19 | if ($ShotHit && $ActualDamage['TargetAlreadyDead']) { |
@@ -38,9 +38,9 @@ discard block |
||
38 | 38 | } else { |
39 | 39 | ?> destroying <?php |
40 | 40 | $DamageTypes = 0; |
41 | - if ($ActualDamage['Shield'] > 0){ $DamageTypes = $DamageTypes+1; } |
|
42 | - if ($ActualDamage['NumCDs'] > 0){ $DamageTypes = $DamageTypes+1; } |
|
43 | - if ($ActualDamage['Armour'] > 0){ $DamageTypes = $DamageTypes+1; } |
|
41 | + if ($ActualDamage['Shield'] > 0) { $DamageTypes = $DamageTypes + 1; } |
|
42 | + if ($ActualDamage['NumCDs'] > 0) { $DamageTypes = $DamageTypes + 1; } |
|
43 | + if ($ActualDamage['Armour'] > 0) { $DamageTypes = $DamageTypes + 1; } |
|
44 | 44 | |
45 | 45 | if ($ActualDamage['Shield'] > 0) { |
46 | 46 | ?><span class="shields"><?php echo number_format($ActualDamage['Shield']) ?></span> shields<?php |
@@ -57,19 +57,19 @@ discard block |
||
57 | 57 | } ?>. |
58 | 58 | <br /><?php |
59 | 59 | if ($ShotHit && $ActualDamage['KillingShot']) { |
60 | - $this->includeTemplate('includes/TraderCombatKillMessage.inc.php',array('KillResults'=>$WeaponResults['KillResults'],'TargetPlayer'=>$TargetPlayer,'ShootingPlayer'=>$ShootingPlayer)); |
|
60 | + $this->includeTemplate('includes/TraderCombatKillMessage.inc.php', array('KillResults'=>$WeaponResults['KillResults'], 'TargetPlayer'=>$TargetPlayer, 'ShootingPlayer'=>$ShootingPlayer)); |
|
61 | 61 | } |
62 | 62 | } |
63 | 63 | } |
64 | 64 | if (isset($TraderResults['Drones'])) { |
65 | - $Drones =& $TraderResults['Drones']; |
|
66 | - $ActualDamage =& $Drones['ActualDamage']; |
|
67 | - $WeaponDamage =& $Drones['WeaponDamage']; |
|
68 | - $TargetPlayer =& $Drones['TargetPlayer']; |
|
65 | + $Drones = & $TraderResults['Drones']; |
|
66 | + $ActualDamage = & $Drones['ActualDamage']; |
|
67 | + $WeaponDamage = & $Drones['WeaponDamage']; |
|
68 | + $TargetPlayer = & $Drones['TargetPlayer']; |
|
69 | 69 | $DamageTypes = 0; |
70 | - if ($ActualDamage['Shield'] > 0){ $DamageTypes = $DamageTypes+1; } |
|
71 | - if ($ActualDamage['NumCDs'] > 0){ $DamageTypes = $DamageTypes+1; } |
|
72 | - if ($ActualDamage['Armour'] > 0){ $DamageTypes = $DamageTypes+1; } |
|
70 | + if ($ActualDamage['Shield'] > 0) { $DamageTypes = $DamageTypes + 1; } |
|
71 | + if ($ActualDamage['NumCDs'] > 0) { $DamageTypes = $DamageTypes + 1; } |
|
72 | + if ($ActualDamage['Armour'] > 0) { $DamageTypes = $DamageTypes + 1; } |
|
73 | 73 | |
74 | 74 | echo $ShootingPlayer->getDisplayName(); |
75 | 75 | if ($WeaponDamage['Launched'] == 0) { |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | } ?>. |
113 | 113 | <br /><?php |
114 | 114 | if ($ActualDamage['KillingShot']) { |
115 | - $this->includeTemplate('includes/TraderCombatKillMessage.inc.php',array('KillResults'=>$Drones['KillResults'],'TargetPlayer'=>$TargetPlayer,'ShootingPlayer'=>$ShootingPlayer)); |
|
115 | + $this->includeTemplate('includes/TraderCombatKillMessage.inc.php', array('KillResults'=>$Drones['KillResults'], 'TargetPlayer'=>$TargetPlayer, 'ShootingPlayer'=>$ShootingPlayer)); |
|
116 | 116 | } |
117 | 117 | } |
118 | 118 | } |
@@ -128,4 +128,4 @@ discard block |
||
128 | 128 | } |
129 | 129 | } |
130 | 130 | $TotalDamage = $TraderTeamCombatResults['TotalDamage']; ?> |
131 | -This fleet <?php if ($TotalDamage > 0){ ?>hits for a total of <span class="red"><?php echo $TotalDamage ?></span> damage in this round of combat<?php } else{ ?>does no damage this round. You call that a fleet? They need a better recruiter<?php } ?>.<br /> |
|
131 | +This fleet <?php if ($TotalDamage > 0) { ?>hits for a total of <span class="red"><?php echo $TotalDamage ?></span> damage in this round of combat<?php } else { ?>does no damage this round. You call that a fleet? They need a better recruiter<?php } ?>.<br /> |
@@ -1,7 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | foreach ($TraderTeamCombatResults['Traders'] as $AccountID => $TraderResults) { |
3 | - $ShootingPlayer =& $TraderResults['Player']; |
|
4 | - $TotalDamage =& $TraderResults['TotalDamage']; |
|
3 | + $ShootingPlayer = & $TraderResults['Player']; |
|
4 | + $TotalDamage = & $TraderResults['TotalDamage']; |
|
5 | 5 | if ($MinimalDisplay && !$ThisPlayer->equals($ShootingPlayer)) { |
6 | 6 | echo $ShootingPlayer->getDisplayName(); |
7 | 7 | if ($TotalDamage > 0) { |
@@ -17,13 +17,13 @@ discard block |
||
17 | 17 | } else { |
18 | 18 | if (isset($TraderResults['Weapons']) && is_array($TraderResults['Weapons'])) { |
19 | 19 | foreach ($TraderResults['Weapons'] as $WeaponResults) { |
20 | - $ShootingWeapon =& $WeaponResults['Weapon']; |
|
21 | - $ShotHit =& $WeaponResults['Hit']; |
|
22 | - $ActualDamage =& $WeaponResults['ActualDamage']; |
|
23 | - $WeaponDamage =& $WeaponResults['WeaponDamage']; |
|
24 | - $TargetPlanet =& $WeaponResults['TargetPlanet']; |
|
20 | + $ShootingWeapon = & $WeaponResults['Weapon']; |
|
21 | + $ShotHit = & $WeaponResults['Hit']; |
|
22 | + $ActualDamage = & $WeaponResults['ActualDamage']; |
|
23 | + $WeaponDamage = & $WeaponResults['WeaponDamage']; |
|
24 | + $TargetPlanet = & $WeaponResults['TargetPlanet']; |
|
25 | 25 | |
26 | - echo $ShootingPlayer->getDisplayName() ?> fires their <?php echo $ShootingWeapon->getName() ?> at <?php if ($ShotHit && $ActualDamage['TargetAlreadyDead']){ ?>the debris that was once <?php } echo $TargetPlanet->getCombatName(); |
|
26 | + echo $ShootingPlayer->getDisplayName() ?> fires their <?php echo $ShootingWeapon->getName() ?> at <?php if ($ShotHit && $ActualDamage['TargetAlreadyDead']) { ?>the debris that was once <?php } echo $TargetPlanet->getCombatName(); |
|
27 | 27 | if (!$ShotHit || !$ActualDamage['TargetAlreadyDead']) { |
28 | 28 | if (!$ShotHit) { |
29 | 29 | ?> and misses<?php |
@@ -42,9 +42,9 @@ discard block |
||
42 | 42 | } else { |
43 | 43 | ?> destroying <?php |
44 | 44 | $DamageTypes = 0; |
45 | - if ($ActualDamage['Shield'] > 0){ $DamageTypes = $DamageTypes+1; } |
|
46 | - if ($ActualDamage['NumCDs'] > 0){ $DamageTypes = $DamageTypes+1; } |
|
47 | - if ($ActualDamage['Armour'] > 0){ $DamageTypes = $DamageTypes+1; } |
|
45 | + if ($ActualDamage['Shield'] > 0) { $DamageTypes = $DamageTypes + 1; } |
|
46 | + if ($ActualDamage['NumCDs'] > 0) { $DamageTypes = $DamageTypes + 1; } |
|
47 | + if ($ActualDamage['Armour'] > 0) { $DamageTypes = $DamageTypes + 1; } |
|
48 | 48 | |
49 | 49 | if ($ActualDamage['Shield'] > 0) { |
50 | 50 | ?><span class="shields"><?php echo number_format($ActualDamage['Shield']) ?></span> shields<?php |
@@ -61,19 +61,19 @@ discard block |
||
61 | 61 | } ?>. |
62 | 62 | <br /><?php |
63 | 63 | if ($ShotHit && $ActualDamage['KillingShot']) { |
64 | - $this->includeTemplate('includes/PlanetKillMessage.inc.php',array('KillResults'=>$WeaponResults['KillResults'],'TargetPlanet'=>$TargetPlanet)); |
|
64 | + $this->includeTemplate('includes/PlanetKillMessage.inc.php', array('KillResults'=>$WeaponResults['KillResults'], 'TargetPlanet'=>$TargetPlanet)); |
|
65 | 65 | } |
66 | 66 | } |
67 | 67 | } |
68 | 68 | if (isset($TraderResults['Drones'])) { |
69 | - $Drones =& $TraderResults['Drones']; |
|
70 | - $ActualDamage =& $Drones['ActualDamage']; |
|
71 | - $WeaponDamage =& $Drones['WeaponDamage']; |
|
72 | - $TargetPlanet =& $Drones['TargetPlanet']; |
|
69 | + $Drones = & $TraderResults['Drones']; |
|
70 | + $ActualDamage = & $Drones['ActualDamage']; |
|
71 | + $WeaponDamage = & $Drones['WeaponDamage']; |
|
72 | + $TargetPlanet = & $Drones['TargetPlanet']; |
|
73 | 73 | $DamageTypes = 0; |
74 | - if ($ActualDamage['Shield'] > 0){ $DamageTypes = $DamageTypes+1; } |
|
75 | - if ($ActualDamage['NumCDs'] > 0){ $DamageTypes = $DamageTypes+1; } |
|
76 | - if ($ActualDamage['Armour'] > 0){ $DamageTypes = $DamageTypes+1; } |
|
74 | + if ($ActualDamage['Shield'] > 0) { $DamageTypes = $DamageTypes + 1; } |
|
75 | + if ($ActualDamage['NumCDs'] > 0) { $DamageTypes = $DamageTypes + 1; } |
|
76 | + if ($ActualDamage['Armour'] > 0) { $DamageTypes = $DamageTypes + 1; } |
|
77 | 77 | |
78 | 78 | echo $ShootingPlayer->getDisplayName(); |
79 | 79 | if ($WeaponDamage['Launched'] == 0) { |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | } ?>. |
117 | 117 | <br /><?php |
118 | 118 | if ($ActualDamage['KillingShot']) { |
119 | - $this->includeTemplate('includes/PlanetKillMessage.inc.php',array('KillResults'=>$Drones['KillResults'],'TargetPlanet'=>$TargetPlanet)); |
|
119 | + $this->includeTemplate('includes/PlanetKillMessage.inc.php', array('KillResults'=>$Drones['KillResults'], 'TargetPlanet'=>$TargetPlanet)); |
|
120 | 120 | } |
121 | 121 | } |
122 | 122 | } |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | } ?>.<br /><br /><?php |
132 | 132 | } |
133 | 133 | $TotalDamage = $TraderTeamCombatResults['TotalDamage']; ?> |
134 | -This fleet <?php if ($TotalDamage > 0){ ?>hits for a total of <span class="red"><?php echo $TotalDamage ?></span> damage in this round of combat<?php } else{ ?>does no damage this round. You call that a fleet? They need a better recruiter<?php } ?>.<br /><?php |
|
134 | +This fleet <?php if ($TotalDamage > 0) { ?>hits for a total of <span class="red"><?php echo $TotalDamage ?></span> damage in this round of combat<?php } else { ?>does no damage this round. You call that a fleet? They need a better recruiter<?php } ?>.<br /><?php |
|
135 | 135 | foreach ($TraderTeamCombatResults['Downgrades'] as $structureID => $numDestroyed) { ?> |
136 | 136 | This team destroys <span class="red"><?php echo $numDestroyed; ?> </span><?php echo pluralise($TargetPlanet->getStructureTypes($structureID)->name(), $numDestroyed); ?>.<br /><?php |
137 | 137 | } ?> |
@@ -1,11 +1,11 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | if (isset($ForcesCombatResults['Results']) && is_array($ForcesCombatResults['Results'])) { |
3 | 3 | foreach ($ForcesCombatResults['Results'] as $ForceType => $ForceResults) { |
4 | - $ShootingWeapon =& $ForceResults['Weapon']; |
|
5 | - $ShotHit =& $ForceResults['Hit']; |
|
6 | - $ActualDamage =& $ForceResults['ActualDamage']; |
|
7 | - $WeaponDamage =& $ForceResults['WeaponDamage']; |
|
8 | - $TargetPlayer =& $ForceResults['TargetPlayer']; |
|
4 | + $ShootingWeapon = & $ForceResults['Weapon']; |
|
5 | + $ShotHit = & $ForceResults['Hit']; |
|
6 | + $ActualDamage = & $ForceResults['ActualDamage']; |
|
7 | + $WeaponDamage = & $ForceResults['WeaponDamage']; |
|
8 | + $TargetPlayer = & $ForceResults['TargetPlayer']; |
|
9 | 9 | ?> |
10 | 10 | <span class="cds"><?php echo $ActualDamage['Launched'] ?? $WeaponDamage['Launched']; ?></span><?php |
11 | 11 | if ($ForceType == 'Mines') { |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | ?> scout drones kamikaze themselves against <?php |
17 | 17 | } |
18 | 18 | |
19 | - if ($ShotHit && $ActualDamage['TargetAlreadyDead']){ ?> the debris that was once <?php } |
|
19 | + if ($ShotHit && $ActualDamage['TargetAlreadyDead']) { ?> the debris that was once <?php } |
|
20 | 20 | echo $TargetPlayer->getDisplayName(); |
21 | 21 | if (!$ShotHit || !$ActualDamage['TargetAlreadyDead']) { |
22 | 22 | if (!$ShotHit) { |
@@ -37,9 +37,9 @@ discard block |
||
37 | 37 | ?> destroying <?php |
38 | 38 | } |
39 | 39 | $DamageTypes = 0; |
40 | - if ($ActualDamage['Shield'] > 0){ $DamageTypes = $DamageTypes+1; } |
|
41 | - if ($ActualDamage['NumCDs'] > 0){ $DamageTypes = $DamageTypes+1; } |
|
42 | - if ($ActualDamage['Armour'] > 0){ $DamageTypes = $DamageTypes+1; } |
|
40 | + if ($ActualDamage['Shield'] > 0) { $DamageTypes = $DamageTypes + 1; } |
|
41 | + if ($ActualDamage['NumCDs'] > 0) { $DamageTypes = $DamageTypes + 1; } |
|
42 | + if ($ActualDamage['Armour'] > 0) { $DamageTypes = $DamageTypes + 1; } |
|
43 | 43 | |
44 | 44 | if ($ActualDamage['Shield'] > 0) { |
45 | 45 | ?><span class="shields"><?php echo number_format($ActualDamage['Shield']) ?></span> shields<?php |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | } ?>. |
56 | 56 | <br /><?php |
57 | 57 | if ($ShotHit && $ActualDamage['KillingShot']) { |
58 | - $this->includeTemplate('includes/TraderCombatKillMessage.inc.php',array('KillResults'=>$ForceResults['KillResults'],'TargetPlayer'=>$TargetPlayer)); |
|
58 | + $this->includeTemplate('includes/TraderCombatKillMessage.inc.php', array('KillResults'=>$ForceResults['KillResults'], 'TargetPlayer'=>$TargetPlayer)); |
|
59 | 59 | } |
60 | 60 | } |
61 | 61 | } |
@@ -63,5 +63,5 @@ discard block |
||
63 | 63 | ?>Forces are <span class="red">DESTROYED!</span><br /><?php |
64 | 64 | } |
65 | 65 | |
66 | -$TotalDamage =& $ForcesCombatResults['TotalDamage'] ?> |
|
67 | -The forces <?php if ($TotalDamage > 0){ ?>hit for a total of <span class="red"><?php echo number_format($TotalDamage) ?></span> damage in this round of combat<?php } else{ ?>do no damage this round<?php } ?>. |
|
66 | +$TotalDamage = & $ForcesCombatResults['TotalDamage'] ?> |
|
67 | +The forces <?php if ($TotalDamage > 0) { ?>hit for a total of <span class="red"><?php echo number_format($TotalDamage) ?></span> damage in this round of combat<?php } else { ?>do no damage this round<?php } ?>. |
@@ -374,13 +374,13 @@ |
||
374 | 374 | $this->db->query('SELECT type,sum(amount) as amount FROM player_hof WHERE ' . $this->SQL . ' AND game_id IN (SELECT game_id FROM game WHERE ignore_stats = \'FALSE\') GROUP BY type'); |
375 | 375 | $this->HOF = array(); |
376 | 376 | while ($this->db->nextRecord()) { |
377 | - $hof =& $this->HOF; |
|
377 | + $hof = & $this->HOF; |
|
378 | 378 | $typeList = explode(':', $this->db->getField('type')); |
379 | 379 | foreach ($typeList as $type) { |
380 | 380 | if (!isset($hof[$type])) { |
381 | 381 | $hof[$type] = array(); |
382 | 382 | } |
383 | - $hof =& $hof[$type]; |
|
383 | + $hof = & $hof[$type]; |
|
384 | 384 | } |
385 | 385 | $hof = $this->db->getFloat('amount'); |
386 | 386 | } |
@@ -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 | } |
@@ -79,12 +79,12 @@ discard block |
||
79 | 79 | 'exp_gain' => 540, |
80 | 80 | ], |
81 | 81 | ]; |
82 | - public function name() { return "Terran Planet"; } |
|
83 | - public function imageLink() { return "images/planet1.png"; } |
|
84 | - public function description() { return "A lush world, with forests, seas, sweeping meadows, and indigenous lifeforms."; } |
|
82 | + public function name() { return "Terran Planet"; } |
|
83 | + public function imageLink() { return "images/planet1.png"; } |
|
84 | + public function description() { return "A lush world, with forests, seas, sweeping meadows, and indigenous lifeforms."; } |
|
85 | 85 | public function maxAttackers() { return 10; } |
86 | - public function maxLanded() { return self::MAX_LANDED_UNLIMITED; } |
|
87 | - public function menuOptions() { return self::DEFAULT_MENU_OPTIONS; } |
|
86 | + public function maxLanded() { return self::MAX_LANDED_UNLIMITED; } |
|
87 | + public function menuOptions() { return self::DEFAULT_MENU_OPTIONS; } |
|
88 | 88 | } |
89 | 89 | |
90 | 90 | class AridPlanet extends SmrPlanetType { |
@@ -108,12 +108,12 @@ discard block |
||
108 | 108 | 'exp_gain' => 180, |
109 | 109 | ], |
110 | 110 | ]; |
111 | - public function name() { return "Arid Planet"; } |
|
112 | - public function imageLink() { return "images/planet2.png"; } |
|
113 | - public function description() { return "A world mostly devoid of surface water, but capable of supporting life."; } |
|
111 | + public function name() { return "Arid Planet"; } |
|
112 | + public function imageLink() { return "images/planet2.png"; } |
|
113 | + public function description() { return "A world mostly devoid of surface water, but capable of supporting life."; } |
|
114 | 114 | public function maxAttackers() { return 5; } |
115 | - public function maxLanded() { return 5; } |
|
116 | - public function menuOptions() { return ['CONSTRUCTION', 'DEFENSE', 'STOCKPILE', 'OWNERSHIP']; } |
|
115 | + public function maxLanded() { return 5; } |
|
116 | + public function menuOptions() { return ['CONSTRUCTION', 'DEFENSE', 'STOCKPILE', 'OWNERSHIP']; } |
|
117 | 117 | } |
118 | 118 | |
119 | 119 | class DwarfPlanet extends SmrPlanetType { |
@@ -137,12 +137,12 @@ discard block |
||
137 | 137 | 'exp_gain' => 540, |
138 | 138 | ], |
139 | 139 | ]; |
140 | - public function name() { return "Dwarf Planet"; } |
|
141 | - public function imageLink() { return "images/planet3.png"; } |
|
142 | - public function description() { return "A smaller than usual planet, with no native life present."; } |
|
140 | + public function name() { return "Dwarf Planet"; } |
|
141 | + public function imageLink() { return "images/planet3.png"; } |
|
142 | + public function description() { return "A smaller than usual planet, with no native life present."; } |
|
143 | 143 | public function maxAttackers() { return 5; } |
144 | - public function maxLanded() { return self::MAX_LANDED_UNLIMITED; } |
|
145 | - public function menuOptions() { return self::DEFAULT_MENU_OPTIONS; } |
|
144 | + public function maxLanded() { return self::MAX_LANDED_UNLIMITED; } |
|
145 | + public function menuOptions() { return self::DEFAULT_MENU_OPTIONS; } |
|
146 | 146 | } |
147 | 147 | |
148 | 148 | class ProtoPlanet extends SmrPlanetType { |
@@ -178,12 +178,12 @@ discard block |
||
178 | 178 | 'exp_gain' => 540, |
179 | 179 | ], |
180 | 180 | ]; |
181 | - public function name() { return "Protoplanet"; } |
|
182 | - public function imageLink() { return "images/planet5.png"; } |
|
183 | - public function description() { return "A developing planet, not yet able to support the infrastructure of advanced technologies."; } |
|
181 | + public function name() { return "Protoplanet"; } |
|
182 | + public function imageLink() { return "images/planet5.png"; } |
|
183 | + public function description() { return "A developing planet, not yet able to support the infrastructure of advanced technologies."; } |
|
184 | 184 | public function maxAttackers() { return 5; } |
185 | - public function maxLanded() { return 5; } |
|
186 | - public function menuOptions() { return self::DEFAULT_MENU_OPTIONS; } |
|
185 | + public function maxLanded() { return 5; } |
|
186 | + public function menuOptions() { return self::DEFAULT_MENU_OPTIONS; } |
|
187 | 187 | } |
188 | 188 | |
189 | 189 | class DefenseWorld extends SmrPlanetType { |
@@ -213,10 +213,10 @@ discard block |
||
213 | 213 | 'exp_gain' => 9, |
214 | 214 | ], |
215 | 215 | ]; |
216 | - public function name() { return "Defense World"; } |
|
217 | - public function imageLink() { return "images/planet4.png"; } |
|
218 | - public function description() { return "A fully armed and operational battle station loaded with excessive firepower."; } |
|
216 | + public function name() { return "Defense World"; } |
|
217 | + public function imageLink() { return "images/planet4.png"; } |
|
218 | + public function description() { return "A fully armed and operational battle station loaded with excessive firepower."; } |
|
219 | 219 | public function maxAttackers() { return 10; } |
220 | - public function maxLanded() { return self::MAX_LANDED_UNLIMITED; } |
|
221 | - public function menuOptions() { return self::DEFAULT_MENU_OPTIONS; } |
|
220 | + public function maxLanded() { return self::MAX_LANDED_UNLIMITED; } |
|
221 | + public function menuOptions() { return self::DEFAULT_MENU_OPTIONS; } |
|
222 | 222 | } |
@@ -66,68 +66,68 @@ |
||
66 | 66 | abstract public function &getModifiedForceDamageAgainstPlayer(SmrForce $forces, AbstractSmrPlayer $targetPlayer); |
67 | 67 | |
68 | 68 | protected function &doPlayerDamageToForce(array &$return, AbstractSmrPlayer $weaponPlayer, SmrForce $forces) { |
69 | - $return['WeaponDamage'] =& $this->getModifiedDamageAgainstForces($weaponPlayer,$forces); |
|
70 | - $return['ActualDamage'] =& $forces->doWeaponDamage($return['WeaponDamage']); |
|
69 | + $return['WeaponDamage'] = & $this->getModifiedDamageAgainstForces($weaponPlayer, $forces); |
|
70 | + $return['ActualDamage'] = & $forces->doWeaponDamage($return['WeaponDamage']); |
|
71 | 71 | if ($return['ActualDamage']['KillingShot']) { |
72 | - $return['KillResults'] =& $forces->killForcesByPlayer($weaponPlayer); |
|
72 | + $return['KillResults'] = & $forces->killForcesByPlayer($weaponPlayer); |
|
73 | 73 | } |
74 | 74 | return $return; |
75 | 75 | } |
76 | 76 | |
77 | 77 | protected function &doPlayerDamageToPlayer(array &$return, AbstractSmrPlayer $weaponPlayer, AbstractSmrPlayer $targetPlayer) { |
78 | - $return['WeaponDamage'] =& $this->getModifiedDamageAgainstPlayer($weaponPlayer,$targetPlayer); |
|
79 | - $return['ActualDamage'] =& $targetPlayer->getShip()->doWeaponDamage($return['WeaponDamage']); |
|
78 | + $return['WeaponDamage'] = & $this->getModifiedDamageAgainstPlayer($weaponPlayer, $targetPlayer); |
|
79 | + $return['ActualDamage'] = & $targetPlayer->getShip()->doWeaponDamage($return['WeaponDamage']); |
|
80 | 80 | |
81 | 81 | if ($return['ActualDamage']['KillingShot']) { |
82 | - $return['KillResults'] =& $targetPlayer->killPlayerByPlayer($weaponPlayer); |
|
82 | + $return['KillResults'] = & $targetPlayer->killPlayerByPlayer($weaponPlayer); |
|
83 | 83 | } |
84 | 84 | return $return; |
85 | 85 | } |
86 | 86 | |
87 | 87 | protected function &doPlayerDamageToPort(array &$return, AbstractSmrPlayer $weaponPlayer, SmrPort $port) { |
88 | - $return['WeaponDamage'] =& $this->getModifiedDamageAgainstPort($weaponPlayer,$port); |
|
89 | - $return['ActualDamage'] =& $port->doWeaponDamage($return['WeaponDamage']); |
|
88 | + $return['WeaponDamage'] = & $this->getModifiedDamageAgainstPort($weaponPlayer, $port); |
|
89 | + $return['ActualDamage'] = & $port->doWeaponDamage($return['WeaponDamage']); |
|
90 | 90 | if ($return['ActualDamage']['KillingShot']) { |
91 | - $return['KillResults'] =& $port->killPortByPlayer($weaponPlayer); |
|
91 | + $return['KillResults'] = & $port->killPortByPlayer($weaponPlayer); |
|
92 | 92 | } |
93 | 93 | return $return; |
94 | 94 | } |
95 | 95 | |
96 | 96 | protected function &doPlayerDamageToPlanet(array &$return, AbstractSmrPlayer $weaponPlayer, SmrPlanet $planet, $delayed) { |
97 | - $return['WeaponDamage'] =& $this->getModifiedDamageAgainstPlanet($weaponPlayer,$planet); |
|
98 | - $return['ActualDamage'] =& $planet->doWeaponDamage($return['WeaponDamage'],$delayed); |
|
97 | + $return['WeaponDamage'] = & $this->getModifiedDamageAgainstPlanet($weaponPlayer, $planet); |
|
98 | + $return['ActualDamage'] = & $planet->doWeaponDamage($return['WeaponDamage'], $delayed); |
|
99 | 99 | if ($return['ActualDamage']['KillingShot']) { |
100 | - $return['KillResults'] =& $planet->killPlanetByPlayer($weaponPlayer); |
|
100 | + $return['KillResults'] = & $planet->killPlanetByPlayer($weaponPlayer); |
|
101 | 101 | } |
102 | 102 | return $return; |
103 | 103 | } |
104 | 104 | |
105 | 105 | protected function &doPortDamageToPlayer(array &$return, SmrPort $port, AbstractSmrPlayer $targetPlayer) { |
106 | - $return['WeaponDamage'] =& $this->getModifiedPortDamageAgainstPlayer($port,$targetPlayer); |
|
107 | - $return['ActualDamage'] =& $targetPlayer->getShip()->doWeaponDamage($return['WeaponDamage']); |
|
106 | + $return['WeaponDamage'] = & $this->getModifiedPortDamageAgainstPlayer($port, $targetPlayer); |
|
107 | + $return['ActualDamage'] = & $targetPlayer->getShip()->doWeaponDamage($return['WeaponDamage']); |
|
108 | 108 | |
109 | 109 | if ($return['ActualDamage']['KillingShot']) { |
110 | - $return['KillResults'] =& $targetPlayer->killPlayerByPort($port); |
|
110 | + $return['KillResults'] = & $targetPlayer->killPlayerByPort($port); |
|
111 | 111 | } |
112 | 112 | return $return; |
113 | 113 | } |
114 | 114 | |
115 | 115 | protected function &doPlanetDamageToPlayer(array &$return, SmrPlanet $planet, AbstractSmrPlayer $targetPlayer) { |
116 | - $return['WeaponDamage'] =& $this->getModifiedPlanetDamageAgainstPlayer($planet,$targetPlayer); |
|
117 | - $return['ActualDamage'] =& $targetPlayer->getShip()->doWeaponDamage($return['WeaponDamage']); |
|
116 | + $return['WeaponDamage'] = & $this->getModifiedPlanetDamageAgainstPlayer($planet, $targetPlayer); |
|
117 | + $return['ActualDamage'] = & $targetPlayer->getShip()->doWeaponDamage($return['WeaponDamage']); |
|
118 | 118 | |
119 | 119 | if ($return['ActualDamage']['KillingShot']) { |
120 | - $return['KillResults'] =& $targetPlayer->killPlayerByPlanet($planet); |
|
120 | + $return['KillResults'] = & $targetPlayer->killPlayerByPlanet($planet); |
|
121 | 121 | } |
122 | 122 | return $return; |
123 | 123 | } |
124 | 124 | |
125 | 125 | protected function &doForceDamageToPlayer(array &$return, SmrForce $forces, AbstractSmrPlayer $targetPlayer) { |
126 | - $return['WeaponDamage'] =& $this->getModifiedForceDamageAgainstPlayer($forces,$targetPlayer); |
|
127 | - $return['ActualDamage'] =& $targetPlayer->getShip()->doWeaponDamage($return['WeaponDamage']); |
|
126 | + $return['WeaponDamage'] = & $this->getModifiedForceDamageAgainstPlayer($forces, $targetPlayer); |
|
127 | + $return['ActualDamage'] = & $targetPlayer->getShip()->doWeaponDamage($return['WeaponDamage']); |
|
128 | 128 | |
129 | 129 | if ($return['ActualDamage']['KillingShot']) { |
130 | - $return['KillResults'] =& $targetPlayer->killPlayerByForces($forces); |
|
130 | + $return['KillResults'] = & $targetPlayer->killPlayerByForces($forces); |
|
131 | 131 | } |
132 | 132 | return $return; |
133 | 133 | } |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | $return = array('MaxDamage' => 0, 'Shield' => 0, 'Armour' => 0, 'Rollover' => $this->isDamageRollover()); |
94 | 94 | return $return; |
95 | 95 | } |
96 | - $damage =& $this->getModifiedDamage(); |
|
96 | + $damage = & $this->getModifiedDamage(); |
|
97 | 97 | if ($targetPlayer->getShip()->isFederal()) { // do less damage to fed ships |
98 | 98 | $damage['MaxDamage'] = IRound($damage['MaxDamage'] * self::FED_SHIP_DAMAGE_MODIFIER); |
99 | 99 | $damage['Shield'] = IRound($damage['Shield'] * self::FED_SHIP_DAMAGE_MODIFIER); |
@@ -130,12 +130,12 @@ discard block |
||
130 | 130 | } |
131 | 131 | |
132 | 132 | protected function &doForceDamageToPlayer(array &$return, SmrForce $forces, AbstractSmrPlayer $targetPlayer, $minesAreAttacker = false) { |
133 | - $return['WeaponDamage'] =& $this->getModifiedForceDamageAgainstPlayer($forces, $targetPlayer, $minesAreAttacker); |
|
134 | - $return['ActualDamage'] =& $targetPlayer->getShip()->doMinesDamage($return['WeaponDamage']); |
|
133 | + $return['WeaponDamage'] = & $this->getModifiedForceDamageAgainstPlayer($forces, $targetPlayer, $minesAreAttacker); |
|
134 | + $return['ActualDamage'] = & $targetPlayer->getShip()->doMinesDamage($return['WeaponDamage']); |
|
135 | 135 | $return['ActualDamage']['Launched'] = ICeil($return['WeaponDamage']['Launched'] * $return['ActualDamage']['TotalDamage'] / $return['WeaponDamage']['MaxDamage']); |
136 | 136 | |
137 | 137 | if ($return['ActualDamage']['KillingShot']) { |
138 | - $return['KillResults'] =& $targetPlayer->killPlayerByForces($forces); |
|
138 | + $return['KillResults'] = & $targetPlayer->killPlayerByForces($forces); |
|
139 | 139 | } |
140 | 140 | return $return; |
141 | 141 | } |