We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -1,48 +1,48 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -if(is_array($TraderTeamCombatResults['Traders'])) { |
|
4 | - foreach($TraderTeamCombatResults['Traders'] as $AccountID => $TraderResults) { |
|
5 | - $ShootingPlayer =& $TraderResults['Player']; |
|
6 | - $TotalDamage =& $TraderResults['TotalDamage']; |
|
7 | - if($TraderResults['DeadBeforeShot']) { |
|
3 | +if (is_array($TraderTeamCombatResults['Traders'])) { |
|
4 | + foreach ($TraderTeamCombatResults['Traders'] as $AccountID => $TraderResults) { |
|
5 | + $ShootingPlayer = & $TraderResults['Player']; |
|
6 | + $TotalDamage = & $TraderResults['TotalDamage']; |
|
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 | - echo $ShootingPlayer->getDisplayName() ?> fires their <?php echo $ShootingWeapon->getName() ?> at<?php if($ShotHit && $ActualDamage['TargetAlreadyDead']){ ?> the debris that was once<?php } ?> the forces<?php |
|
18 | + echo $ShootingPlayer->getDisplayName() ?> fires their <?php echo $ShootingWeapon->getName() ?> at<?php if ($ShotHit && $ActualDamage['TargetAlreadyDead']) { ?> the debris that was once<?php } ?> the forces<?php |
|
19 | 19 | if (!$ShotHit || !$ActualDamage['TargetAlreadyDead']) { |
20 | - if(!$ShotHit) { |
|
20 | + if (!$ShotHit) { |
|
21 | 21 | ?> and misses<?php |
22 | - } else if($ActualDamage['TotalDamage'] == 0) { |
|
23 | - if($WeaponDamage['Shield'] > 0) { |
|
24 | - ?> which proves ineffective against the <?php if($ActualDamage['HasMines']){ ?>mines<?php } else if($ActualDamage['HasCDs']){ ?>combat drones<?php } else{ ?>scout drones<?php } |
|
25 | - } else if($WeaponDamage['Armour'] > 0) { |
|
26 | - ?> which is deflected by the <?php if($ActualDamage['HasMines']){ ?>mines<?php } else if($ActualDamage['HasCDs']){ ?>combat drones<?php } else{ ?>scout drones<?php } ?> shields<?php |
|
22 | + } else if ($ActualDamage['TotalDamage'] == 0) { |
|
23 | + if ($WeaponDamage['Shield'] > 0) { |
|
24 | + ?> which proves ineffective against the <?php if ($ActualDamage['HasMines']) { ?>mines<?php } else if ($ActualDamage['HasCDs']) { ?>combat drones<?php } else { ?>scout drones<?php } |
|
25 | + } else if ($WeaponDamage['Armour'] > 0) { |
|
26 | + ?> which is deflected by the <?php if ($ActualDamage['HasMines']) { ?>mines<?php } else if ($ActualDamage['HasCDs']) { ?>combat drones<?php } else { ?>scout drones<?php } ?> shields<?php |
|
27 | 27 | } else { |
28 | 28 | ?> but it cannot do any damage<?php |
29 | 29 | } |
30 | 30 | } else { |
31 | 31 | ?> destroying <?php |
32 | 32 | $DamageTypes = 0; |
33 | - if($ActualDamage['NumMines'] > 0){ $DamageTypes = $DamageTypes+1; } |
|
34 | - if($ActualDamage['NumCDs'] > 0){ $DamageTypes = $DamageTypes+1; } |
|
35 | - if($ActualDamage['NumSDs'] > 0){ $DamageTypes = $DamageTypes+1; } |
|
33 | + if ($ActualDamage['NumMines'] > 0) { $DamageTypes = $DamageTypes + 1; } |
|
34 | + if ($ActualDamage['NumCDs'] > 0) { $DamageTypes = $DamageTypes + 1; } |
|
35 | + if ($ActualDamage['NumSDs'] > 0) { $DamageTypes = $DamageTypes + 1; } |
|
36 | 36 | |
37 | - if($ActualDamage['NumMines'] > 0) { |
|
37 | + if ($ActualDamage['NumMines'] > 0) { |
|
38 | 38 | ?><span class="red"><?php echo number_format($ActualDamage['NumMines']) ?></span> mines<?php |
39 | 39 | $this->doDamageTypeReductionDisplay($DamageTypes); |
40 | 40 | } |
41 | - if($ActualDamage['NumCDs'] > 0) { |
|
41 | + if ($ActualDamage['NumCDs'] > 0) { |
|
42 | 42 | ?><span class="red"><?php echo number_format($ActualDamage['NumCDs']) ?></span> combat drones<?php |
43 | 43 | $this->doDamageTypeReductionDisplay($DamageTypes); |
44 | 44 | } |
45 | - if($ActualDamage['NumSDs'] > 0) { |
|
45 | + if ($ActualDamage['NumSDs'] > 0) { |
|
46 | 46 | ?><span class="red"><?php echo number_format($ActualDamage['NumSDs']) ?></span> scout drones<?php |
47 | 47 | } |
48 | 48 | } |
@@ -53,71 +53,71 @@ discard block |
||
53 | 53 | } |
54 | 54 | } |
55 | 55 | } |
56 | - if(isset($TraderResults['Drones'])) { |
|
57 | - $Drones =& $TraderResults['Drones']; |
|
58 | - $ActualDamage =& $Drones['ActualDamage']; |
|
59 | - $WeaponDamage =& $Drones['WeaponDamage']; |
|
60 | - $TargetPlayer =& $Drones['TargetPlayer']; |
|
56 | + if (isset($TraderResults['Drones'])) { |
|
57 | + $Drones = & $TraderResults['Drones']; |
|
58 | + $ActualDamage = & $Drones['ActualDamage']; |
|
59 | + $WeaponDamage = & $Drones['WeaponDamage']; |
|
60 | + $TargetPlayer = & $Drones['TargetPlayer']; |
|
61 | 61 | |
62 | 62 | echo $ShootingPlayer->getDisplayName(); |
63 | - if($WeaponDamage['Launched'] == 0) { |
|
63 | + if ($WeaponDamage['Launched'] == 0) { |
|
64 | 64 | ?> fails to launch their combat drones<?php |
65 | 65 | } else { |
66 | - ?> launches <span class="cds"><?php echo $WeaponDamage['Launched'] ?></span> combat drones at<?php if($ActualDamage['TargetAlreadyDead']){ ?> the debris that was once <?php } ?> the forces<?php |
|
67 | - if(!$ActualDamage['TargetAlreadyDead']) { |
|
68 | - if($ActualDamage['TotalDamage'] == 0) { |
|
69 | - if($WeaponDamage['Shield'] > 0) { |
|
70 | - ?> which prove ineffective against the <?php if($ActualDamage['HasMines']){ ?>mines<?php } else if($ActualDamage['HasCDs']){ ?>combat drones<?php } else{ ?>scout drones<?php } |
|
71 | - } else if($WeaponDamage['Armour'] > 0) { |
|
66 | + ?> launches <span class="cds"><?php echo $WeaponDamage['Launched'] ?></span> combat drones at<?php if ($ActualDamage['TargetAlreadyDead']) { ?> the debris that was once <?php } ?> the forces<?php |
|
67 | + if (!$ActualDamage['TargetAlreadyDead']) { |
|
68 | + if ($ActualDamage['TotalDamage'] == 0) { |
|
69 | + if ($WeaponDamage['Shield'] > 0) { |
|
70 | + ?> which prove ineffective against the <?php if ($ActualDamage['HasMines']) { ?>mines<?php } else if ($ActualDamage['HasCDs']) { ?>combat drones<?php } else { ?>scout drones<?php } |
|
71 | + } else if ($WeaponDamage['Armour'] > 0) { |
|
72 | 72 | ?> which is deflected by the <?php |
73 | - if($ActualDamage['HasMines']){ ?>mines<?php } else if($ActualDamage['HasCDs']){ ?>combat drones<?php } else{ ?>scout drones<?php } ?> shields<?php |
|
73 | + if ($ActualDamage['HasMines']) { ?>mines<?php } else if ($ActualDamage['HasCDs']) { ?>combat drones<?php } else { ?>scout drones<?php } ?> shields<?php |
|
74 | 74 | } else { |
75 | 75 | ?> but they cannot do any damage<?php |
76 | 76 | } |
77 | 77 | } else { |
78 | 78 | $DamageTypes = 0; |
79 | - if($ActualDamage['NumMines'] > $WeaponDamage['Kamikaze']) { $DamageTypes = $DamageTypes+1; } |
|
80 | - if($ActualDamage['NumCDs'] > 0){ $DamageTypes = $DamageTypes+1; } |
|
81 | - if($ActualDamage['NumSDs'] > 0){ $DamageTypes = $DamageTypes+1; } |
|
79 | + if ($ActualDamage['NumMines'] > $WeaponDamage['Kamikaze']) { $DamageTypes = $DamageTypes + 1; } |
|
80 | + if ($ActualDamage['NumCDs'] > 0) { $DamageTypes = $DamageTypes + 1; } |
|
81 | + if ($ActualDamage['NumSDs'] > 0) { $DamageTypes = $DamageTypes + 1; } |
|
82 | 82 | |
83 | - if($WeaponDamage['Kamikaze'] == 0) { |
|
83 | + if ($WeaponDamage['Kamikaze'] == 0) { |
|
84 | 84 | ?> destroying <?php |
85 | 85 | } else { |
86 | 86 | ?> of which <span class="cds"><?php echo $WeaponDamage['Kamikaze'] ?></span> kamikaze against <span class="red"><?php echo $WeaponDamage['Kamikaze'] ?></span> mines<?php |
87 | - if($DamageTypes > 0) { |
|
87 | + if ($DamageTypes > 0) { |
|
88 | 88 | ?> whilst the others destroy <?php |
89 | 89 | } |
90 | 90 | } |
91 | - if($ActualDamage['NumMines'] > $WeaponDamage['Kamikaze']) { |
|
91 | + if ($ActualDamage['NumMines'] > $WeaponDamage['Kamikaze']) { |
|
92 | 92 | ?><span class="red"><?php echo number_format($ActualDamage['NumMines']) ?></span> mines<?php |
93 | 93 | $this->doDamageTypeReductionDisplay($DamageTypes); |
94 | 94 | } |
95 | - if($ActualDamage['NumCDs'] > 0) { |
|
95 | + if ($ActualDamage['NumCDs'] > 0) { |
|
96 | 96 | ?><span class="red"><?php echo number_format($ActualDamage['NumCDs']) ?></span> combat drones<?php |
97 | 97 | $this->doDamageTypeReductionDisplay($DamageTypes); |
98 | 98 | } |
99 | - if($ActualDamage['NumSDs'] > 0) { |
|
99 | + if ($ActualDamage['NumSDs'] > 0) { |
|
100 | 100 | ?><span class="red"><?php echo number_format($ActualDamage['NumSDs']) ?></span> scout drones<?php |
101 | 101 | } |
102 | 102 | } |
103 | 103 | } |
104 | 104 | }?>. |
105 | 105 | <br /> |
106 | - <?php if($ActualDamage['KillingShot']) { |
|
106 | + <?php if ($ActualDamage['KillingShot']) { |
|
107 | 107 | ?>Forces are <span class="red">DESTROYED!</span><br /><?php |
108 | 108 | } |
109 | 109 | } |
110 | 110 | } |
111 | 111 | echo $ShootingPlayer->getDisplayName(); |
112 | - if($TotalDamage > 0) { |
|
112 | + if ($TotalDamage > 0) { |
|
113 | 113 | ?> hits for a total of <span class="red"><?php echo $TotalDamage ?></span> damage in this round of combat<?php |
114 | 114 | } else { |
115 | 115 | ?> does no damage this round.<?php |
116 | - if(!$TraderResults['DeadBeforeShot']) { |
|
116 | + if (!$TraderResults['DeadBeforeShot']) { |
|
117 | 117 | ?> Maybe they should go back to the academy<?php |
118 | 118 | } |
119 | 119 | } ?>.<br /><br /><?php |
120 | 120 | } |
121 | 121 | } |
122 | 122 | $TotalDamage = $TraderTeamCombatResults['TotalDamage']; ?> |
123 | -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 } ?>. |
|
123 | +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 } ?>. |
@@ -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 /> |
@@ -46,7 +46,7 @@ |
||
46 | 46 | |
47 | 47 | // Don't lose more exp than you have |
48 | 48 | $lost_xp = min($player->getExperience(), |
49 | - IRound(SmrPort::getBaseExperience($amount, $good_distance))); |
|
49 | + IRound(SmrPort::getBaseExperience($amount, $good_distance))); |
|
50 | 50 | $player->decreaseExperience($lost_xp); |
51 | 51 | $player->increaseHOF($lost_xp, array('Trade', 'Experience', 'Jettisoned'), HOF_PUBLIC); |
52 | 52 |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | $return = array('MaxDamage' => 0, 'Shield' => 0, 'Armour' => 0, 'Rollover' => $this->isDamageRollover()); |
95 | 95 | return $return; |
96 | 96 | } |
97 | - $damage =& $this->getModifiedDamage(); |
|
97 | + $damage = & $this->getModifiedDamage(); |
|
98 | 98 | if ($targetPlayer->getShip()->isFederal()) { // do less damage to fed ships |
99 | 99 | $damage['MaxDamage'] = IRound($damage['MaxDamage'] * self::FED_SHIP_DAMAGE_MODIFIER); |
100 | 100 | $damage['Shield'] = IRound($damage['Shield'] * self::FED_SHIP_DAMAGE_MODIFIER); |
@@ -131,12 +131,12 @@ discard block |
||
131 | 131 | } |
132 | 132 | |
133 | 133 | protected function &doForceDamageToPlayer(array &$return, SmrForce $forces, AbstractSmrPlayer $targetPlayer, $minesAreAttacker = false) { |
134 | - $return['WeaponDamage'] =& $this->getModifiedForceDamageAgainstPlayer($forces, $targetPlayer, $minesAreAttacker); |
|
135 | - $return['ActualDamage'] =& $targetPlayer->getShip()->doMinesDamage($return['WeaponDamage']); |
|
134 | + $return['WeaponDamage'] = & $this->getModifiedForceDamageAgainstPlayer($forces, $targetPlayer, $minesAreAttacker); |
|
135 | + $return['ActualDamage'] = & $targetPlayer->getShip()->doMinesDamage($return['WeaponDamage']); |
|
136 | 136 | $return['ActualDamage']['Launched'] = ICeil($return['WeaponDamage']['Launched'] * $return['ActualDamage']['TotalDamage'] / $return['WeaponDamage']['MaxDamage']); |
137 | 137 | |
138 | 138 | if ($return['ActualDamage']['KillingShot']) { |
139 | - $return['KillResults'] =& $targetPlayer->killPlayerByForces($forces); |
|
139 | + $return['KillResults'] = & $targetPlayer->killPlayerByForces($forces); |
|
140 | 140 | } |
141 | 141 | return $return; |
142 | 142 | } |
@@ -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']); |
@@ -20,7 +20,7 @@ |
||
20 | 20 | } |
21 | 21 | } |
22 | 22 | $missingLocs = array_diff(array_keys(SmrLocation::getAllLocations()), |
23 | - array_keys($existingLocs)); |
|
23 | + array_keys($existingLocs)); |
|
24 | 24 | $missingLocNames = []; |
25 | 25 | foreach ($missingLocs as $locID) { |
26 | 26 | $missingLocNames[] = SmrLocation::getLocation($locID)->getName(); |
@@ -363,26 +363,26 @@ |
||
363 | 363 | } |
364 | 364 | |
365 | 365 | public function isNPC() { |
366 | - if(!isset($this->npc)) { |
|
367 | - $this->db->query('SELECT login FROM npc_logins WHERE login = '.$this->db->escapeString($this->getLogin()).' LIMIT 1;'); |
|
366 | + if (!isset($this->npc)) { |
|
367 | + $this->db->query('SELECT login FROM npc_logins WHERE login = ' . $this->db->escapeString($this->getLogin()) . ' LIMIT 1;'); |
|
368 | 368 | $this->npc = $this->db->nextRecord(); |
369 | 369 | } |
370 | 370 | return $this->npc; |
371 | 371 | } |
372 | 372 | |
373 | 373 | protected function getHOFData() { |
374 | - if(!isset($this->HOF)) { |
|
374 | + if (!isset($this->HOF)) { |
|
375 | 375 | //Get Player HOF |
376 | 376 | $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'); |
377 | 377 | $this->HOF = array(); |
378 | - while($this->db->nextRecord()) { |
|
379 | - $hof =& $this->HOF; |
|
380 | - $typeList = explode(':',$this->db->getField('type')); |
|
381 | - foreach($typeList as $type) { |
|
382 | - if(!isset($hof[$type])) { |
|
378 | + while ($this->db->nextRecord()) { |
|
379 | + $hof = & $this->HOF; |
|
380 | + $typeList = explode(':', $this->db->getField('type')); |
|
381 | + foreach ($typeList as $type) { |
|
382 | + if (!isset($hof[$type])) { |
|
383 | 383 | $hof[$type] = array(); |
384 | 384 | } |
385 | - $hof =& $hof[$type]; |
|
385 | + $hof = & $hof[$type]; |
|
386 | 386 | } |
387 | 387 | $hof = $this->db->getFloat('amount'); |
388 | 388 | } |
@@ -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; |
@@ -469,8 +469,9 @@ |
||
469 | 469 | |
470 | 470 | if (!$player->isDead() && $player->getNewbieTurns() <= NEWBIE_TURNS_WARNING_LIMIT && |
471 | 471 | $player->getNewbieWarning() && |
472 | - $var['url'] != 'newbie_warning_processing.php') |
|
473 | - forward(create_container('newbie_warning_processing.php')); |
|
472 | + $var['url'] != 'newbie_warning_processing.php') { |
|
473 | + forward(create_container('newbie_warning_processing.php')); |
|
474 | + } |
|
474 | 475 | } |
475 | 476 | |
476 | 477 | // Initialize the template |