We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -1,34 +1,34 @@ discard block |
||
1 | 1 | <?php |
2 | -if(isset($ForcesCombatResults['Results']) && is_array($ForcesCombatResults['Results'])) { |
|
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']; |
|
2 | +if (isset($ForcesCombatResults['Results']) && is_array($ForcesCombatResults['Results'])) { |
|
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']; |
|
9 | 9 | ?> |
10 | 10 | <span class="cds"><?php echo $ActualDamage['Launched'] ?? $WeaponDamage['Launched']; ?></span><?php |
11 | - if($ForceType == 'Mines') { |
|
11 | + if ($ForceType == 'Mines') { |
|
12 | 12 | ?> mines kamikaze themselves against <?php |
13 | - } else if($ForceType == 'Drones') { |
|
13 | + } else if ($ForceType == 'Drones') { |
|
14 | 14 | ?> combat drones launch at <?php |
15 | - } else if($ForceType == 'Scouts') { |
|
15 | + } else if ($ForceType == 'Scouts') { |
|
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 | - if(!$ShotHit) { |
|
22 | + if (!$ShotHit) { |
|
23 | 23 | ?> and misses<?php |
24 | - } else if($ActualDamage['TotalDamage'] == 0) { |
|
25 | - if($WeaponDamage['Shield'] > 0) { |
|
26 | - if($ActualDamage['HasCDs']) { |
|
24 | + } else if ($ActualDamage['TotalDamage'] == 0) { |
|
25 | + if ($WeaponDamage['Shield'] > 0) { |
|
26 | + if ($ActualDamage['HasCDs']) { |
|
27 | 27 | ?> which proves ineffective against their combat drones<?php |
28 | 28 | } else { |
29 | 29 | ?> which washes harmlessly over their hull<?php |
30 | 30 | } |
31 | - } else if($WeaponDamage['Armour'] > 0) { |
|
31 | + } else if ($WeaponDamage['Armour'] > 0) { |
|
32 | 32 | ?> which is deflected by their shields<?php |
33 | 33 | } else { |
34 | 34 | ?> but it cannot do any damage<?php |
@@ -37,31 +37,31 @@ 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 | - if($ActualDamage['Shield'] > 0) { |
|
44 | + if ($ActualDamage['Shield'] > 0) { |
|
45 | 45 | ?><span class="shields"><?php echo number_format($ActualDamage['Shield']) ?></span> shields<?php |
46 | 46 | $this->doDamageTypeReductionDisplay($DamageTypes); |
47 | 47 | } |
48 | - if($ActualDamage['NumCDs'] > 0) { |
|
48 | + if ($ActualDamage['NumCDs'] > 0) { |
|
49 | 49 | ?><span class="cds"><?php echo number_format($ActualDamage['NumCDs']) ?></span> drones<?php |
50 | 50 | $this->doDamageTypeReductionDisplay($DamageTypes); |
51 | 51 | } |
52 | - if($ActualDamage['Armour'] > 0) { |
|
52 | + if ($ActualDamage['Armour'] > 0) { |
|
53 | 53 | ?><span class="red"><?php echo number_format($ActualDamage['Armour']) ?></span> plates of armour<?php |
54 | 54 | } |
55 | 55 | } ?>. |
56 | 56 | <br /><?php |
57 | 57 | if ($ShotHit && $ActualDamage['KillingShot']) { |
58 | - $this->includeTemplate('includes/TraderCombatKillMessage.inc',array('KillResults'=>$ForceResults['KillResults'],'TargetPlayer'=>$TargetPlayer)); |
|
58 | + $this->includeTemplate('includes/TraderCombatKillMessage.inc', array('KillResults'=>$ForceResults['KillResults'], 'TargetPlayer'=>$TargetPlayer)); |
|
59 | 59 | } |
60 | 60 | } |
61 | 61 | } |
62 | -if(isset($ForcesCombatResults['ForcesDestroyed']) && $ForcesCombatResults['ForcesDestroyed']) { |
|
62 | +if (isset($ForcesCombatResults['ForcesDestroyed']) && $ForcesCombatResults['ForcesDestroyed']) { |
|
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 } ?>. |
@@ -1,36 +1,36 @@ discard block |
||
1 | 1 | <?php |
2 | -if(is_array($TraderTeamCombatResults['Traders'])) { |
|
3 | - foreach($TraderTeamCombatResults['Traders'] as $AccountID => $TraderResults) { |
|
4 | - $ShootingPlayer =& $TraderResults['Player']; |
|
5 | - $TotalDamage =& $TraderResults['TotalDamage']; |
|
2 | +if (is_array($TraderTeamCombatResults['Traders'])) { |
|
3 | + foreach ($TraderTeamCombatResults['Traders'] as $AccountID => $TraderResults) { |
|
4 | + $ShootingPlayer = & $TraderResults['Player']; |
|
5 | + $TotalDamage = & $TraderResults['TotalDamage']; |
|
6 | 6 | |
7 | - if($TraderResults['DeadBeforeShot']) { |
|
7 | + if ($TraderResults['DeadBeforeShot']) { |
|
8 | 8 | echo $ShootingPlayer->getDisplayName() ?> died before they were able to attack!<br /><?php |
9 | 9 | } else { |
10 | - if(isset($TraderResults['Weapons']) && is_array($TraderResults['Weapons'])) { |
|
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']; |
|
10 | + if (isset($TraderResults['Weapons']) && is_array($TraderResults['Weapons'])) { |
|
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']; |
|
17 | 17 | |
18 | 18 | echo $ShootingPlayer->getDisplayName() ?> fires their <?php echo $ShootingWeapon->getName() ?> at <?php |
19 | - if($ShotHit && $ActualDamage['TargetAlreadyDead']) { |
|
19 | + if ($ShotHit && $ActualDamage['TargetAlreadyDead']) { |
|
20 | 20 | ?>the debris that was once <?php |
21 | 21 | } |
22 | 22 | echo $TargetPlayer->getDisplayName(); |
23 | 23 | if (!$ShotHit || !$ActualDamage['TargetAlreadyDead']) { |
24 | - if(!$ShotHit) { |
|
24 | + if (!$ShotHit) { |
|
25 | 25 | ?> and misses<?php |
26 | - } else if($ActualDamage['TotalDamage'] == 0) { |
|
27 | - if($WeaponDamage['Shield'] > 0) { |
|
28 | - if($ActualDamage['HasCDs']) { |
|
26 | + } else if ($ActualDamage['TotalDamage'] == 0) { |
|
27 | + if ($WeaponDamage['Shield'] > 0) { |
|
28 | + if ($ActualDamage['HasCDs']) { |
|
29 | 29 | ?> which proves ineffective against their combat drones<?php |
30 | 30 | } else { |
31 | 31 | ?> which washes harmlessly over their hull<?php |
32 | 32 | } |
33 | - } else if($WeaponDamage['Armour'] > 0) { |
|
33 | + } else if ($WeaponDamage['Armour'] > 0) { |
|
34 | 34 | ?> which is deflected by their shields<?php |
35 | 35 | } else { |
36 | 36 | ?> but it cannot do any damage<?php |
@@ -38,94 +38,94 @@ 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 | - if($ActualDamage['Shield'] > 0) { |
|
45 | + if ($ActualDamage['Shield'] > 0) { |
|
46 | 46 | ?><span class="shields"><?php echo number_format($ActualDamage['Shield']) ?></span> shields<?php |
47 | 47 | $this->doDamageTypeReductionDisplay($DamageTypes); |
48 | 48 | } |
49 | - if($ActualDamage['NumCDs'] > 0) { |
|
49 | + if ($ActualDamage['NumCDs'] > 0) { |
|
50 | 50 | ?><span class="cds"><?php echo number_format($ActualDamage['NumCDs']) ?></span> combat drones<?php |
51 | 51 | $this->doDamageTypeReductionDisplay($DamageTypes); |
52 | 52 | } |
53 | - if($ActualDamage['Armour'] > 0) { |
|
53 | + if ($ActualDamage['Armour'] > 0) { |
|
54 | 54 | ?><span class="red"><?php echo number_format($ActualDamage['Armour']) ?></span> plates of armour<?php |
55 | 55 | } |
56 | 56 | } |
57 | 57 | } ?>. |
58 | 58 | <br /><?php |
59 | 59 | if ($ShotHit && $ActualDamage['KillingShot']) { |
60 | - $this->includeTemplate('includes/TraderCombatKillMessage.inc',array('KillResults'=>$WeaponResults['KillResults'],'TargetPlayer'=>$TargetPlayer,'ShootingPlayer'=>$ShootingPlayer)); |
|
60 | + $this->includeTemplate('includes/TraderCombatKillMessage.inc', array('KillResults'=>$WeaponResults['KillResults'], 'TargetPlayer'=>$TargetPlayer, 'ShootingPlayer'=>$ShootingPlayer)); |
|
61 | 61 | } |
62 | 62 | } |
63 | 63 | } |
64 | - if(isset($TraderResults['Drones'])) { |
|
65 | - $Drones =& $TraderResults['Drones']; |
|
66 | - $ActualDamage =& $Drones['ActualDamage']; |
|
67 | - $WeaponDamage =& $Drones['WeaponDamage']; |
|
68 | - $TargetPlayer =& $Drones['TargetPlayer']; |
|
64 | + if (isset($TraderResults['Drones'])) { |
|
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 | - if($WeaponDamage['Launched'] == 0) { |
|
75 | + if ($WeaponDamage['Launched'] == 0) { |
|
76 | 76 | ?> fails to launch their combat drones<?php |
77 | 77 | } else { |
78 | 78 | ?> launches <span class="cds"><?php echo $WeaponDamage['Launched'] ?></span> combat drones at <?php |
79 | - if($ActualDamage['TargetAlreadyDead']) { |
|
79 | + if ($ActualDamage['TargetAlreadyDead']) { |
|
80 | 80 | ?>the debris that was once <?php |
81 | 81 | } |
82 | 82 | echo $TargetPlayer->getDisplayName(); |
83 | - if(!$ActualDamage['TargetAlreadyDead']) { |
|
84 | - if($ActualDamage['TotalDamage'] == 0) { |
|
85 | - if($WeaponDamage['Shield'] > 0) { |
|
86 | - if($ActualDamage['HasCDs']) { |
|
83 | + if (!$ActualDamage['TargetAlreadyDead']) { |
|
84 | + if ($ActualDamage['TotalDamage'] == 0) { |
|
85 | + if ($WeaponDamage['Shield'] > 0) { |
|
86 | + if ($ActualDamage['HasCDs']) { |
|
87 | 87 | ?> which prove ineffective against their combat drones<?php |
88 | 88 | } else { |
89 | 89 | ?> which washes harmlessly over their hull<?php |
90 | 90 | } |
91 | 91 | } |
92 | - if($ActualDamage['Armour'] > 0) { |
|
92 | + if ($ActualDamage['Armour'] > 0) { |
|
93 | 93 | ?> which is deflected by their shields<?php |
94 | 94 | } else { |
95 | 95 | ?> but they cannot do any damage<?php |
96 | 96 | } |
97 | 97 | } else { |
98 | 98 | ?> destroying <?php |
99 | - if($ActualDamage['Shield'] > 0) { |
|
99 | + if ($ActualDamage['Shield'] > 0) { |
|
100 | 100 | ?><span class="shields"><?php echo number_format($ActualDamage['Shield']) ?></span> shields<?php |
101 | 101 | $this->doDamageTypeReductionDisplay($DamageTypes); |
102 | 102 | } |
103 | - if($ActualDamage['NumCDs'] > 0) { |
|
103 | + if ($ActualDamage['NumCDs'] > 0) { |
|
104 | 104 | ?><span class="cds"><?php echo number_format($ActualDamage['NumCDs']) ?></span> combat drones<?php |
105 | 105 | $this->doDamageTypeReductionDisplay($DamageTypes); |
106 | 106 | } |
107 | - if($ActualDamage['Armour'] > 0) { |
|
107 | + if ($ActualDamage['Armour'] > 0) { |
|
108 | 108 | ?><span class="red"><?php echo number_format($ActualDamage['Armour']) ?></span> plates of armour<?php |
109 | 109 | } |
110 | 110 | } |
111 | 111 | } |
112 | 112 | } ?>. |
113 | 113 | <br /><?php |
114 | - if($ActualDamage['KillingShot']) { |
|
115 | - $this->includeTemplate('includes/TraderCombatKillMessage.inc',array('KillResults'=>$Drones['KillResults'],'TargetPlayer'=>$TargetPlayer,'ShootingPlayer'=>$ShootingPlayer)); |
|
114 | + if ($ActualDamage['KillingShot']) { |
|
115 | + $this->includeTemplate('includes/TraderCombatKillMessage.inc', array('KillResults'=>$Drones['KillResults'], 'TargetPlayer'=>$TargetPlayer, 'ShootingPlayer'=>$ShootingPlayer)); |
|
116 | 116 | } |
117 | 117 | } |
118 | 118 | } |
119 | 119 | echo $ShootingPlayer->getDisplayName(); |
120 | - if($TotalDamage > 0) { |
|
120 | + if ($TotalDamage > 0) { |
|
121 | 121 | ?> hits for a total of <span class="red"><?php echo $TotalDamage ?></span> damage in this round of combat<?php |
122 | 122 | } else { |
123 | 123 | ?> does no damage this round.<?php |
124 | - if(!$TraderResults['DeadBeforeShot']) { |
|
124 | + if (!$TraderResults['DeadBeforeShot']) { |
|
125 | 125 | ?> Maybe they should go back to the academy<?php |
126 | 126 | } |
127 | 127 | } ?>.<br /><br /><?php |
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,35 +1,35 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | $CombatPlanet = $PlanetCombatResults['Planet']; |
3 | 3 | $TotalDamage = $PlanetCombatResults['TotalDamage']; |
4 | -if($MinimalDisplay) { |
|
4 | +if ($MinimalDisplay) { |
|
5 | 5 | echo $CombatPlanet->getCombatName(); |
6 | - if($TotalDamage > 0) { |
|
6 | + if ($TotalDamage > 0) { |
|
7 | 7 | ?> hit for a total of <span class="red"><?php echo $TotalDamage; ?></span> damage in this round of combat of which <span class="red"><?php echo $PlanetCombatResults['TotalDamagePerTargetPlayer'][$ThisPlayer->getAccountID()]; ?></span> was done to you<?php |
8 | 8 | } else { |
9 | 9 | ?> does no damage this round<?php |
10 | 10 | } ?>. <?php echo $AttackLogLink; |
11 | 11 | return; |
12 | 12 | } |
13 | -if(isset($PlanetCombatResults['Weapons']) && is_array($PlanetCombatResults['Weapons'])) { |
|
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']; |
|
13 | +if (isset($PlanetCombatResults['Weapons']) && is_array($PlanetCombatResults['Weapons'])) { |
|
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']; |
|
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 | - if(!$ShotHit) { |
|
23 | + if (!$ShotHit) { |
|
24 | 24 | ?> and misses<?php |
25 | - } else if($ActualDamage['TotalDamage'] == 0) { |
|
26 | - if($WeaponDamage['Shield'] > 0) { |
|
27 | - if($ActualDamage['HasCDs']) { |
|
25 | + } else if ($ActualDamage['TotalDamage'] == 0) { |
|
26 | + if ($WeaponDamage['Shield'] > 0) { |
|
27 | + if ($ActualDamage['HasCDs']) { |
|
28 | 28 | ?> which proves ineffective against their combat drones<?php |
29 | 29 | } else { |
30 | 30 | ?> which washes harmlessly over their hull<?php |
31 | 31 | } |
32 | - } else if($WeaponDamage['Armour'] > 0) { |
|
32 | + } else if ($WeaponDamage['Armour'] > 0) { |
|
33 | 33 | ?> which is deflected by their shields<?php |
34 | 34 | } else { |
35 | 35 | ?> but it cannot do any damage<?php |
@@ -37,81 +37,81 @@ 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 | - if($ActualDamage['Shield'] > 0) { |
|
44 | + if ($ActualDamage['Shield'] > 0) { |
|
45 | 45 | ?><span class="shields"><?php echo number_format($ActualDamage['Shield']); ?></span> shields<?php |
46 | 46 | $this->doDamageTypeReductionDisplay($DamageTypes); |
47 | 47 | } |
48 | - if($ActualDamage['NumCDs'] > 0) { |
|
48 | + if ($ActualDamage['NumCDs'] > 0) { |
|
49 | 49 | ?><span class="cds"><?php echo number_format($ActualDamage['NumCDs']); ?></span> combat drones<?php |
50 | 50 | $this->doDamageTypeReductionDisplay($DamageTypes); |
51 | 51 | } |
52 | - if($ActualDamage['Armour'] > 0) { |
|
52 | + if ($ActualDamage['Armour'] > 0) { |
|
53 | 53 | ?><span class="red"><?php echo number_format($ActualDamage['Armour']); ?></span> plates of armour<?php |
54 | 54 | } |
55 | 55 | } |
56 | 56 | } ?>. |
57 | 57 | <br /><?php |
58 | 58 | if ($ShotHit && $ActualDamage['KillingShot']) { |
59 | - $this->includeTemplate('includes/TraderCombatKillMessage.inc',array('KillResults'=>$WeaponResults['KillResults'],'TargetPlayer'=>$TargetPlayer)); |
|
59 | + $this->includeTemplate('includes/TraderCombatKillMessage.inc', array('KillResults'=>$WeaponResults['KillResults'], 'TargetPlayer'=>$TargetPlayer)); |
|
60 | 60 | } |
61 | 61 | } |
62 | 62 | } |
63 | -if(isset($PlanetCombatResults['Drones'])) { |
|
64 | - $Drones =& $PlanetCombatResults['Drones']; |
|
65 | - $ActualDamage =& $Drones['ActualDamage']; |
|
66 | - $WeaponDamage =& $Drones['WeaponDamage']; |
|
67 | - $TargetPlayer =& $Drones['TargetPlayer']; |
|
63 | +if (isset($PlanetCombatResults['Drones'])) { |
|
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 | - if($WeaponDamage['Launched'] == 0) { |
|
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(); |
|
78 | - if(!$ActualDamage['TargetAlreadyDead']) { |
|
79 | - if($ActualDamage['TotalDamage'] == 0) { |
|
80 | - if($WeaponDamage['Shield'] > 0) { |
|
81 | - if($ActualDamage['HasCDs']) { |
|
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 | + if (!$ActualDamage['TargetAlreadyDead']) { |
|
79 | + if ($ActualDamage['TotalDamage'] == 0) { |
|
80 | + if ($WeaponDamage['Shield'] > 0) { |
|
81 | + if ($ActualDamage['HasCDs']) { |
|
82 | 82 | ?> which prove ineffective against their combat drones<?php |
83 | 83 | } else { |
84 | 84 | ?> which washes harmlessly over their hull<?php |
85 | 85 | } |
86 | - } else if($WeaponDamage['Armour'] > 0) { |
|
86 | + } else if ($WeaponDamage['Armour'] > 0) { |
|
87 | 87 | ?> which is deflected by their shields<?php |
88 | 88 | } else { |
89 | 89 | ?> but they cannot do any damage<?php |
90 | 90 | } |
91 | 91 | } else { |
92 | 92 | ?> destroying <?php |
93 | - if($ActualDamage['Shield'] > 0) { |
|
93 | + if ($ActualDamage['Shield'] > 0) { |
|
94 | 94 | ?><span class="shields"><?php echo number_format($ActualDamage['Shield']); ?></span> shields<?php |
95 | 95 | $this->doDamageTypeReductionDisplay($DamageTypes); |
96 | 96 | } |
97 | - if($ActualDamage['NumCDs'] > 0) { |
|
97 | + if ($ActualDamage['NumCDs'] > 0) { |
|
98 | 98 | ?><span class="cds"><?php echo number_format($ActualDamage['NumCDs']); ?></span> combat drones<?php |
99 | 99 | $this->doDamageTypeReductionDisplay($DamageTypes); |
100 | 100 | } |
101 | - if($ActualDamage['Armour'] > 0) { |
|
101 | + if ($ActualDamage['Armour'] > 0) { |
|
102 | 102 | ?><span class="red"><?php echo number_format($ActualDamage['Armour']); ?></span> plates of armour<?php |
103 | 103 | } |
104 | 104 | } |
105 | 105 | } |
106 | 106 | } ?>. |
107 | 107 | <br /><?php |
108 | - if($ActualDamage['KillingShot']) { |
|
109 | - $this->includeTemplate('includes/TraderCombatKillMessage.inc',array('KillResults'=>$Drones['KillResults'],'TargetPlayer'=>$TargetPlayer)); |
|
108 | + if ($ActualDamage['KillingShot']) { |
|
109 | + $this->includeTemplate('includes/TraderCombatKillMessage.inc', array('KillResults'=>$Drones['KillResults'], 'TargetPlayer'=>$TargetPlayer)); |
|
110 | 110 | } |
111 | 111 | } |
112 | 112 | |
113 | 113 | echo $CombatPlanet->getCombatName(); |
114 | -if($TotalDamage > 0) { |
|
114 | +if ($TotalDamage > 0) { |
|
115 | 115 | ?> hit for a total of <span class="red"><?php echo $TotalDamage; ?></span> damage in this round of combat<?php |
116 | 116 | } else { |
117 | 117 | ?> does no damage this round. You call that a planet? It needs a better builder<?php |
@@ -337,8 +337,8 @@ |
||
337 | 337 | foreach (Globals::getAvailableTemplates() as $Template) { |
338 | 338 | foreach (Globals::getAvailableColourSchemes($Template) as $ColourScheme) { |
339 | 339 | $selected = ($ThisAccount->getTemplate() == $Template && |
340 | - $ThisAccount->getColourScheme() == $ColourScheme && |
|
341 | - $ThisAccount->isDefaultCSSEnabled()) ? 'selected' : ''; |
|
340 | + $ThisAccount->getColourScheme() == $ColourScheme && |
|
341 | + $ThisAccount->isDefaultCSSEnabled()) ? 'selected' : ''; |
|
342 | 342 | $name = $Template . ' - ' . $ColourScheme; |
343 | 343 | ?><option value="<?php echo $name; ?>" <?php echo $selected; ?>><?php echo $name; ?></option><?php |
344 | 344 | } |
@@ -68,8 +68,7 @@ |
||
68 | 68 | |
69 | 69 | </body> |
70 | 70 | </html><?php |
71 | -} |
|
72 | -catch (Throwable $e) { |
|
71 | +} catch (Throwable $e) { |
|
73 | 72 | handleException($e); |
74 | 73 | } |
75 | 74 | ?> |
@@ -69,7 +69,7 @@ |
||
69 | 69 | exit; |
70 | 70 | } |
71 | 71 | $account->addAuthMethod($_SESSION['socialLogin']->getLoginType(), |
72 | - $_SESSION['socialLogin']->getUserID()); |
|
72 | + $_SESSION['socialLogin']->getUserID()); |
|
73 | 73 | session_destroy(); |
74 | 74 | } |
75 | 75 |
@@ -69,7 +69,7 @@ |
||
69 | 69 | if (!empty(BUG_REPORT_TO_ADDRESSES)) { |
70 | 70 | $mail = setupMailer(); |
71 | 71 | $mail->Subject = (defined('PAGE_PREFIX') ? PAGE_PREFIX : '??? ') . |
72 | - 'Automatic Bug Report'; |
|
72 | + 'Automatic Bug Report'; |
|
73 | 73 | $mail->setFrom('[email protected]'); |
74 | 74 | $mail->Body = $message; |
75 | 75 | foreach (BUG_REPORT_TO_ADDRESSES as $toAddress) { |
@@ -150,7 +150,7 @@ |
||
150 | 150 | $account->increaseSmrRewardCredits(2 * CREDITS_PER_DOLLAR); // Give $2 worth of "reward" credits for joining. |
151 | 151 | if ($socialLogin) { |
152 | 152 | $account->addAuthMethod($_SESSION['socialLogin']->getLoginType(), |
153 | - $_SESSION['socialLogin']->getUserID()); |
|
153 | + $_SESSION['socialLogin']->getUserID()); |
|
154 | 154 | if ($validatedBySocial) { |
155 | 155 | $account->setValidated(true); |
156 | 156 | $account->update(); |
@@ -5,8 +5,9 @@ discard block |
||
5 | 5 | require_once(ENGINE . 'Default/help.inc'); |
6 | 6 | |
7 | 7 | $topic_id = $_SERVER['QUERY_STRING']; |
8 | - if (empty($topic_id) || !is_numeric($topic_id)) |
|
9 | - $topic_id = 1; |
|
8 | + if (empty($topic_id) || !is_numeric($topic_id)) { |
|
9 | + $topic_id = 1; |
|
10 | + } |
|
10 | 11 | ?> |
11 | 12 | <!DOCTYPE html> |
12 | 13 | |
@@ -48,8 +49,7 @@ discard block |
||
48 | 49 | |
49 | 50 | </body> |
50 | 51 | </html><?php |
51 | -} |
|
52 | -catch (Throwable $e) { |
|
52 | +} catch (Throwable $e) { |
|
53 | 53 | handleException($e); |
54 | 54 | } |
55 | 55 | ?> |