We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -1,91 +1,91 @@ |
||
1 | 1 | <?php declare(strict_types=1); |
2 | -$template->assign('PageTopic','Combat Simulator'); |
|
2 | +$template->assign('PageTopic', 'Combat Simulator'); |
|
3 | 3 | |
4 | -$template->assign('EditDummysLink',SmrSession::getNewHREF(create_container('skeleton.php','edit_dummys.php'))); |
|
4 | +$template->assign('EditDummysLink', SmrSession::getNewHREF(create_container('skeleton.php', 'edit_dummys.php'))); |
|
5 | 5 | $template->assign('DummyNames', DummyPlayer::getDummyPlayerNames()); |
6 | 6 | |
7 | 7 | $duplicates = false; |
8 | 8 | $usedNames = array(); |
9 | 9 | $realAttackers = array(); |
10 | 10 | $attackers = array(); |
11 | -$i=1; |
|
12 | -if(isset($_POST['attackers'])) |
|
13 | - foreach($_POST['attackers'] as $attackerName) { |
|
14 | - if($attackerName=='none') |
|
11 | +$i = 1; |
|
12 | +if (isset($_POST['attackers'])) |
|
13 | + foreach ($_POST['attackers'] as $attackerName) { |
|
14 | + if ($attackerName == 'none') |
|
15 | 15 | continue; |
16 | - if(isset($usedNames[$attackerName])) { |
|
16 | + if (isset($usedNames[$attackerName])) { |
|
17 | 17 | $duplicates = true; |
18 | 18 | continue; |
19 | 19 | } |
20 | 20 | $usedNames[$attackerName] = true; |
21 | - $attackers[$i] =& DummyPlayer::getCachedDummyPlayer($attackerName); |
|
21 | + $attackers[$i] = & DummyPlayer::getCachedDummyPlayer($attackerName); |
|
22 | 22 | $attackers[$i]->setAllianceID(1); |
23 | - $realAttackers[$i] =& $attackers[$i]; |
|
23 | + $realAttackers[$i] = & $attackers[$i]; |
|
24 | 24 | ++$i; |
25 | 25 | } |
26 | 26 | |
27 | -for(;$i<=10;++$i) |
|
27 | +for (;$i <= 10; ++$i) |
|
28 | 28 | $attackers[$i] = null; |
29 | -$template->assign('Attackers',$attackers); |
|
29 | +$template->assign('Attackers', $attackers); |
|
30 | 30 | |
31 | -$i=1; |
|
31 | +$i = 1; |
|
32 | 32 | $realDefenders = array(); |
33 | 33 | $defenders = array(); |
34 | -if(isset($_POST['defenders'])) |
|
35 | - foreach($_POST['defenders'] as $defenderName) { |
|
36 | - if($defenderName=='none') |
|
34 | +if (isset($_POST['defenders'])) |
|
35 | + foreach ($_POST['defenders'] as $defenderName) { |
|
36 | + if ($defenderName == 'none') |
|
37 | 37 | continue; |
38 | - if(isset($usedNames[$defenderName])) { |
|
38 | + if (isset($usedNames[$defenderName])) { |
|
39 | 39 | $duplicates = true; |
40 | 40 | continue; |
41 | 41 | } |
42 | 42 | $usedNames[$attackerName] = true; |
43 | - $defenders[$i] =& DummyPlayer::getCachedDummyPlayer($defenderName); |
|
43 | + $defenders[$i] = & DummyPlayer::getCachedDummyPlayer($defenderName); |
|
44 | 44 | $defenders[$i]->setAllianceID(2); |
45 | - $realDefenders[$i] =& $defenders[$i]; |
|
45 | + $realDefenders[$i] = & $defenders[$i]; |
|
46 | 46 | ++$i; |
47 | 47 | } |
48 | 48 | |
49 | -for(;$i<=10;++$i) |
|
49 | +for (;$i <= 10; ++$i) |
|
50 | 50 | $defenders[$i] = null; |
51 | -$template->assign('Defenders',$defenders); |
|
51 | +$template->assign('Defenders', $defenders); |
|
52 | 52 | |
53 | -$template->assign('Duplicates',$duplicates); |
|
53 | +$template->assign('Duplicates', $duplicates); |
|
54 | 54 | |
55 | -$template->assign('CombatSimHREF',SmrSession::getNewHREF(create_container('skeleton.php','combat_simulator.php'))); |
|
55 | +$template->assign('CombatSimHREF', SmrSession::getNewHREF(create_container('skeleton.php', 'combat_simulator.php'))); |
|
56 | 56 | |
57 | 57 | if (!empty($realAttackers) && !empty($realDefenders)) { |
58 | - if(isset($_REQUEST['run'])) { |
|
59 | - runAnAttack($realAttackers,$realDefenders); |
|
58 | + if (isset($_REQUEST['run'])) { |
|
59 | + runAnAttack($realAttackers, $realDefenders); |
|
60 | 60 | } |
61 | - if(isset($_REQUEST['death_run'])) { |
|
62 | - while(count($realAttackers)>0 && count($realDefenders)>0) { |
|
63 | - runAnAttack($realAttackers,$realDefenders); |
|
64 | - foreach($realAttackers as $key => &$teamPlayer) { |
|
65 | - if($teamPlayer->isDead()) |
|
61 | + if (isset($_REQUEST['death_run'])) { |
|
62 | + while (count($realAttackers) > 0 && count($realDefenders) > 0) { |
|
63 | + runAnAttack($realAttackers, $realDefenders); |
|
64 | + foreach ($realAttackers as $key => &$teamPlayer) { |
|
65 | + if ($teamPlayer->isDead()) |
|
66 | 66 | unset($realAttackers[$key]); |
67 | 67 | } unset($teamPlayer); |
68 | - foreach($realDefenders as $key => &$teamPlayer) { |
|
69 | - if($teamPlayer->isDead()) |
|
68 | + foreach ($realDefenders as $key => &$teamPlayer) { |
|
69 | + if ($teamPlayer->isDead()) |
|
70 | 70 | unset($realDefenders[$key]); |
71 | 71 | } unset($teamPlayer); |
72 | 72 | } |
73 | 73 | } |
74 | 74 | } |
75 | 75 | |
76 | -function runAnAttack($realAttackers,$realDefenders) { |
|
76 | +function runAnAttack($realAttackers, $realDefenders) { |
|
77 | 77 | global $template; |
78 | 78 | $results = array('Attackers' => array('Traders' => array(), 'TotalDamage' => 0), |
79 | 79 | 'Defenders' => array('Traders' => array(), 'TotalDamage' => 0)); |
80 | 80 | foreach ($realAttackers as $accountID => $teamPlayer) { |
81 | - $playerResults =& $teamPlayer->shootPlayers($realDefenders); |
|
82 | - $results['Attackers']['Traders'][] =& $playerResults; |
|
81 | + $playerResults = & $teamPlayer->shootPlayers($realDefenders); |
|
82 | + $results['Attackers']['Traders'][] = & $playerResults; |
|
83 | 83 | $results['Attackers']['TotalDamage'] += $playerResults['TotalDamage']; |
84 | 84 | } |
85 | 85 | foreach ($realDefenders as $accountID => $teamPlayer) { |
86 | - $playerResults =& $teamPlayer->shootPlayers($realAttackers); |
|
87 | - $results['Defenders']['Traders'][] =& $playerResults; |
|
86 | + $playerResults = & $teamPlayer->shootPlayers($realAttackers); |
|
87 | + $results['Defenders']['Traders'][] = & $playerResults; |
|
88 | 88 | $results['Defenders']['TotalDamage'] += $playerResults['TotalDamage']; |
89 | 89 | } |
90 | - $template->assign('TraderCombatResults',$results); |
|
90 | + $template->assign('TraderCombatResults', $results); |
|
91 | 91 | } |
@@ -18,8 +18,7 @@ |
||
18 | 18 | if ($join === false) { |
19 | 19 | create_error('Join Date is not valid!'); |
20 | 20 | } |
21 | -$start = empty(Request::get('game_start')) ? $join : |
|
22 | - DateTime::createFromFormat('d/m/Y|', Request::get('game_start')); |
|
21 | +$start = empty(Request::get('game_start')) ? $join : DateTime::createFromFormat('d/m/Y|', Request::get('game_start')); |
|
23 | 22 | if ($start === false) { |
24 | 23 | create_error('Start Date is not valid!'); |
25 | 24 | } |
@@ -19,8 +19,8 @@ discard block |
||
19 | 19 | 1 => array("pipe", "w") // stdout is a pipe that the child will write to |
20 | 20 | ); |
21 | 21 | $engine = proc_open(UCI_CHESS_ENGINE, $descriptorSpec, $pipes); |
22 | - $toEngine =& $pipes[0]; |
|
23 | - $fromEngine =& $pipes[1]; |
|
22 | + $toEngine = & $pipes[0]; |
|
23 | + $fromEngine = & $pipes[1]; |
|
24 | 24 | |
25 | 25 | function readFromEngine($block = true) { |
26 | 26 | global $fromEngine; |
@@ -84,5 +84,5 @@ discard block |
||
84 | 84 | function debug($message, $debugObject = null) { |
85 | 85 | global $account, $var, $db; |
86 | 86 | echo date('Y-m-d H:i:s - ') . $message . ($debugObject !== null ? EOL . var_export($debugObject, true) : '') . EOL; |
87 | - $db->query('INSERT INTO npc_logs (script_id, npc_id, time, message, debug_info, var) VALUES (' . (defined('SCRIPT_ID') ? SCRIPT_ID : 0) . ', ' . (is_object($account) ? $account->getAccountID() : 0) . ',NOW(),' . $db->escapeString($message) . ',' . $db->escapeString(var_export($debugObject,true)) . ',' . $db->escapeString(var_export($var, true)) . ')'); |
|
87 | + $db->query('INSERT INTO npc_logs (script_id, npc_id, time, message, debug_info, var) VALUES (' . (defined('SCRIPT_ID') ? SCRIPT_ID : 0) . ', ' . (is_object($account) ? $account->getAccountID() : 0) . ',NOW(),' . $db->escapeString($message) . ',' . $db->escapeString(var_export($debugObject, true)) . ',' . $db->escapeString(var_export($var, true)) . ')'); |
|
88 | 88 | } |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -$CombatPort =& $PortCombatResults['Port']; |
|
2 | +$CombatPort = & $PortCombatResults['Port']; |
|
3 | 3 | $TotalDamage = $PortCombatResults['TotalDamage']; |
4 | 4 | if ($MinimalDisplay) { |
5 | 5 | echo $CombatPort->getDisplayName(); |
@@ -12,13 +12,13 @@ discard block |
||
12 | 12 | } |
13 | 13 | if (isset($PortCombatResults['Weapons']) && is_array($PortCombatResults['Weapons'])) { |
14 | 14 | foreach ($PortCombatResults['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 $CombatPort->getDisplayName() ?> fires an <?php echo $ShootingWeapon->getName() ?> at <?php if ($ShotHit && $ActualDamage['TargetAlreadyDead']){ ?> the debris that was once <?php } echo $TargetPlayer->getDisplayName(); |
|
21 | + echo $CombatPort->getDisplayName() ?> fires an <?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,21 +56,21 @@ 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($PortCombatResults['Drones'])) { |
64 | - $Drones =& $PortCombatResults['Drones']; |
|
65 | - $ActualDamage =& $Drones['ActualDamage']; |
|
66 | - $WeaponDamage =& $Drones['WeaponDamage']; |
|
67 | - $TargetPlayer =& $Drones['TargetPlayer']; |
|
64 | + $Drones = & $PortCombatResults['Drones']; |
|
65 | + $ActualDamage = & $Drones['ActualDamage']; |
|
66 | + $WeaponDamage = & $Drones['WeaponDamage']; |
|
67 | + $TargetPlayer = & $Drones['TargetPlayer']; |
|
68 | 68 | |
69 | 69 | echo $CombatPort->getDisplayName(); |
70 | 70 | if ($WeaponDamage['Launched'] == 0) { |
71 | 71 | ?> fails to launch it's combat drones<?php |
72 | 72 | } else { |
73 | - ?> 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(); |
|
73 | + ?> 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(); |
|
74 | 74 | if (!$ActualDamage['TargetAlreadyDead']) { |
75 | 75 | if ($ActualDamage['TotalDamage'] == 0) { |
76 | 76 | if ($WeaponDamage['Shield'] > 0) { |
@@ -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 | - $TargetPort =& $WeaponResults['TargetPort']; |
|
20 | + $ShootingWeapon = & $WeaponResults['Weapon']; |
|
21 | + $ShotHit = & $WeaponResults['Hit']; |
|
22 | + $ActualDamage = & $WeaponResults['ActualDamage']; |
|
23 | + $WeaponDamage = & $WeaponResults['WeaponDamage']; |
|
24 | + $TargetPort = & $WeaponResults['TargetPort']; |
|
25 | 25 | |
26 | - echo $ShootingPlayer->getDisplayName() ?> fires their <?php echo $ShootingWeapon->getName() ?> at <?php if ($ShotHit && $ActualDamage['TargetAlreadyDead']){ ?>the remnants of <?php } echo $TargetPort->getDisplayName(); |
|
26 | + echo $ShootingPlayer->getDisplayName() ?> fires their <?php echo $ShootingWeapon->getName() ?> at <?php if ($ShotHit && $ActualDamage['TargetAlreadyDead']) { ?>the remnants of <?php } echo $TargetPort->getDisplayName(); |
|
27 | 27 | if (!$ShotHit || !$ActualDamage['TargetAlreadyDead']) { |
28 | 28 | if (!$ShotHit) { |
29 | 29 | ?> and misses every critical system<?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,15 +61,15 @@ discard block |
||
61 | 61 | } ?>. |
62 | 62 | <br /><?php |
63 | 63 | if ($ShotHit && $ActualDamage['KillingShot']) { |
64 | - $this->includeTemplate('includes/PortKillMessage.inc.php',array('KillResults'=>$WeaponResults['KillResults'],'TargetPort'=>$TargetPort,'ShootingPlayer'=>$ShootingPlayer)); |
|
64 | + $this->includeTemplate('includes/PortKillMessage.inc.php', array('KillResults'=>$WeaponResults['KillResults'], 'TargetPort'=>$TargetPort, 'ShootingPlayer'=>$ShootingPlayer)); |
|
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 | - $TargetPort =& $Drones['TargetPort']; |
|
69 | + $Drones = & $TraderResults['Drones']; |
|
70 | + $ActualDamage = & $Drones['ActualDamage']; |
|
71 | + $WeaponDamage = & $Drones['WeaponDamage']; |
|
72 | + $TargetPort = & $Drones['TargetPort']; |
|
73 | 73 | |
74 | 74 | echo $ShootingPlayer->getDisplayName(); |
75 | 75 | if ($WeaponDamage['Launched'] == 0) { |
@@ -2,37 +2,37 @@ discard block |
||
2 | 2 | |
3 | 3 | if (is_array($TraderTeamCombatResults['Traders'])) { |
4 | 4 | foreach ($TraderTeamCombatResults['Traders'] as $AccountID => $TraderResults) { |
5 | - $ShootingPlayer =& $TraderResults['Player']; |
|
6 | - $TotalDamage =& $TraderResults['TotalDamage']; |
|
5 | + $ShootingPlayer = & $TraderResults['Player']; |
|
6 | + $TotalDamage = & $TraderResults['TotalDamage']; |
|
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 | - 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 | 20 | if (!$ShotHit) { |
21 | 21 | ?> and misses<?php |
22 | 22 | } elseif ($ActualDamage['TotalDamage'] == 0) { |
23 | 23 | if ($WeaponDamage['Shield'] > 0) { |
24 | - ?> which proves ineffective against the <?php if ($ActualDamage['HasMines']){ ?>mines<?php } elseif ($ActualDamage['HasCDs']){ ?>combat drones<?php } else{ ?>scout drones<?php } |
|
24 | + ?> which proves ineffective against the <?php if ($ActualDamage['HasMines']) { ?>mines<?php } elseif ($ActualDamage['HasCDs']) { ?>combat drones<?php } else { ?>scout drones<?php } |
|
25 | 25 | } elseif ($WeaponDamage['Armour'] > 0) { |
26 | - ?> which is deflected by the <?php if ($ActualDamage['HasMines']){ ?>mines<?php } elseif ($ActualDamage['HasCDs']){ ?>combat drones<?php } else{ ?>scout drones<?php } ?> shields<?php |
|
26 | + ?> which is deflected by the <?php if ($ActualDamage['HasMines']) { ?>mines<?php } elseif ($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 | 37 | if ($ActualDamage['NumMines'] > 0) { |
38 | 38 | ?><span class="red"><?php echo number_format($ActualDamage['NumMines']) ?></span> mines<?php |
@@ -54,31 +54,31 @@ discard block |
||
54 | 54 | } |
55 | 55 | } |
56 | 56 | if (isset($TraderResults['Drones'])) { |
57 | - $Drones =& $TraderResults['Drones']; |
|
58 | - $ActualDamage =& $Drones['ActualDamage']; |
|
59 | - $WeaponDamage =& $Drones['WeaponDamage']; |
|
60 | - $TargetPlayer =& $Drones['TargetPlayer']; |
|
57 | + $Drones = & $TraderResults['Drones']; |
|
58 | + $ActualDamage = & $Drones['ActualDamage']; |
|
59 | + $WeaponDamage = & $Drones['WeaponDamage']; |
|
60 | + $TargetPlayer = & $Drones['TargetPlayer']; |
|
61 | 61 | |
62 | 62 | echo $ShootingPlayer->getDisplayName(); |
63 | 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 |
|
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 | 67 | if (!$ActualDamage['TargetAlreadyDead']) { |
68 | 68 | if ($ActualDamage['TotalDamage'] == 0) { |
69 | 69 | if ($WeaponDamage['Shield'] > 0) { |
70 | - ?> which prove ineffective against the <?php if ($ActualDamage['HasMines']){ ?>mines<?php } elseif ($ActualDamage['HasCDs']){ ?>combat drones<?php } else{ ?>scout drones<?php } |
|
70 | + ?> which prove ineffective against the <?php if ($ActualDamage['HasMines']) { ?>mines<?php } elseif ($ActualDamage['HasCDs']) { ?>combat drones<?php } else { ?>scout drones<?php } |
|
71 | 71 | } elseif ($WeaponDamage['Armour'] > 0) { |
72 | 72 | ?> which is deflected by the <?php |
73 | - if ($ActualDamage['HasMines']){ ?>mines<?php } elseif ($ActualDamage['HasCDs']){ ?>combat drones<?php } else{ ?>scout drones<?php } ?> shields<?php |
|
73 | + if ($ActualDamage['HasMines']) { ?>mines<?php } elseif ($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 | 83 | if ($WeaponDamage['Kamikaze'] == 0) { |
84 | 84 | ?> destroying <?php |
@@ -120,4 +120,4 @@ discard block |
||
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 } ?>. |
@@ -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 | } ?> |