<commit_before><?php
$canAttack = false;

if ($ThisPlayer->hasNewbieTurns()) {
	?><p class="big green">You are under newbie protection!</p><?php
} elseif ($TargetPlayer->hasNewbieTurns()) {
	?><p class="big green">Your target is under newbie protection!</p><?php
} elseif ($ThisPlayer->sameAlliance($TargetPlayer)) {
	?><p class="big blue">This is your alliancemate.</p><?php
} elseif (!$ThisShip->canAttack()) {
	?><p class="big red">You ready your weapons, you take aim, you...realise you have no weapons.</p><?php
} elseif ($ThisPlayer->traderNAPAlliance($TargetPlayer)) {
	?><p class="big blue">This is your ally.</p><?php
} elseif ($ThisPlayer->hasFederalProtection()) {
	?><p class="big blue">You are under federal protection! That wouldn't be fair.</p><?php
} elseif ($TargetPlayer->hasFederalProtection()) {
	?><p class="big blue">Your target is under federal protection!</p><?php
} else {
	$canAttack = true;
	$fightingPlayers = $ThisSector->getFightingTraders($ThisPlayer, $TargetPlayer, true);
	if (count($fightingPlayers['Defenders']) > 0) {
		?><p><a class="submitStyle" href="<?php echo $TargetPlayer->getAttackTraderHREF(); ?>">Attack Trader (3)</a></p><?php
	} else {
		?><p class="big red">You have no targets!</p><?php
	}
}
if (!$canAttack) {
	$fightingPlayers = $ThisSector->getPotentialFightingTraders($ThisPlayer);
}
$fightingPlayers['Attackers'][$ThisPlayer->getAccountID()] = $ThisPlayer;
?>

<table class="standard centered inset">
	<tr><th width="50%">Attacker</th><th width="50%">Defender</th></tr>
	<tr><?php
		foreach ($fightingPlayers as $fleet) {
			?><td class="top"><?php
			if (is_array($fleet)) {
				foreach ($fleet as $fleetPlayer) {
					$fleetShip = $fleetPlayer->getShip();
					if ($fleetPlayer->hasNewbieStatus()) { ?><span class="newbie"><?php }
					echo $fleetPlayer->getLevelName(); ?><br /><?php
					echo $fleetPlayer->getDisplayName() ?><br />
					Race: <?php echo $fleetPlayer->getRaceName() ?><br />
					Alliance: <?php echo $fleetPlayer->getAllianceDisplayName() ?><br /><br /><?php
					echo $fleetShip->getName() ?><br />
					Rating : <?php echo $fleetShip->getDisplayAttackRating($ThisPlayer) . '/' . $fleetShip->getDisplayDefenseRating($ThisPlayer) ?><br /><?php
					if ($ThisShip->hasScanner()) { ?>
						Shields : <?php echo $fleetShip->getShieldLow() . '-' . $fleetShip->getShieldHigh() ?><br />
						Armour : <?php echo $fleetShip->getArmourLow() . '-' . $fleetShip->getArmourHigh() ?><br />
						Hard Points: <?php echo $fleetShip->getNumWeapons() ?><br />
						Combat Drones: <?php echo $fleetShip->getCDsLow() . '-' . $fleetShip->getCDsHigh() ?><br /><?php
					}
					if ($fleetPlayer->hasNewbieStatus()) { ?></span><?php } ?>
					<br /><br /><?php
				}
			} else {
				?>&nbsp;<?php
			} ?>
			</td><?php
		}
		if (!$canAttack) {
			?><td>&nbsp;</td><?php
		} ?>
	</tr>
</table>
<commit_msg>Cloak after examine (#886)<commit_after><?php
$canAttack = false;

if ($ThisPlayer->hasNewbieTurns()) {
	?><p class="big green">You are under newbie protection!</p><?php
} elseif ($TargetPlayer->hasNewbieTurns()) {
	?><p class="big green">Your target is under newbie protection!</p><?php
} elseif ($ThisPlayer->sameAlliance($TargetPlayer)) {
	?><p class="big blue">This is your alliancemate.</p><?php
} elseif (!$ThisShip->canAttack()) {
	?><p class="big red">You ready your weapons, you take aim, you...realise you have no weapons.</p><?php
} elseif ($ThisPlayer->traderNAPAlliance($TargetPlayer)) {
	?><p class="big blue">This is your ally.</p><?php
} elseif ($ThisPlayer->hasFederalProtection()) {
	?><p class="big blue">You are under federal protection! That wouldn't be fair.</p><?php
} elseif ($TargetPlayer->hasFederalProtection()) {
	?><p class="big blue">Your target is under federal protection!</p><?php
} elseif (!$ThisPlayer->canSee($TargetPlayer)) {
	?><p class="big red">Your target has cloaked!</p><?php
} else {
	$canAttack = true;
	$fightingPlayers = $ThisSector->getFightingTraders($ThisPlayer, $TargetPlayer, true);
	if (count($fightingPlayers['Defenders']) > 0) {
		?><p><a class="submitStyle" href="<?php echo $TargetPlayer->getAttackTraderHREF(); ?>">Attack Trader (3)</a></p><?php
	} else {
		?><p class="big red">You have no targets!</p><?php
	}
}
if (!$canAttack) {
	$fightingPlayers = $ThisSector->getPotentialFightingTraders($ThisPlayer);
}
$fightingPlayers['Attackers'][$ThisPlayer->getAccountID()] = $ThisPlayer;
?>

<table class="standard centered inset">
	<tr><th width="50%">Attacker</th><th width="50%">Defender</th></tr>
	<tr><?php
		foreach ($fightingPlayers as $fleet) {
			?><td class="top"><?php
			if (is_array($fleet)) {
				foreach ($fleet as $fleetPlayer) {
					$fleetShip = $fleetPlayer->getShip();
					if ($fleetPlayer->hasNewbieStatus()) { ?><span class="newbie"><?php }
					echo $fleetPlayer->getLevelName(); ?><br /><?php
					echo $fleetPlayer->getDisplayName() ?><br />
					Race: <?php echo $fleetPlayer->getRaceName() ?><br />
					Alliance: <?php echo $fleetPlayer->getAllianceDisplayName() ?><br /><br /><?php
					echo $fleetShip->getName() ?><br />
					Rating : <?php echo $fleetShip->getDisplayAttackRating($ThisPlayer) . '/' . $fleetShip->getDisplayDefenseRating($ThisPlayer) ?><br /><?php
					if ($ThisShip->hasScanner()) { ?>
						Shields : <?php echo $fleetShip->getShieldLow() . '-' . $fleetShip->getShieldHigh() ?><br />
						Armour : <?php echo $fleetShip->getArmourLow() . '-' . $fleetShip->getArmourHigh() ?><br />
						Hard Points: <?php echo $fleetShip->getNumWeapons() ?><br />
						Combat Drones: <?php echo $fleetShip->getCDsLow() . '-' . $fleetShip->getCDsHigh() ?><br /><?php
					}
					if ($fleetPlayer->hasNewbieStatus()) { ?></span><?php } ?>
					<br /><br /><?php
				}
			} else {
				?>&nbsp;<?php
			} ?>
			</td><?php
		}
		if (!$canAttack) {
			?><td>&nbsp;</td><?php
		} ?>
	</tr>
</table>

{'fraction_non_alphanumeric': 0.21597127222982215, 'fraction_numerical': 0.0025649794801641587, 'mean_word_length': 4.762561576354679, 'pattern_counts': {'":': 0, '<': 164, '<?xml version=': 0, '>': 225, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6340297', 'n_tokens_mistral': 2287, 'n_tokens_neox': 2077, 'n_words': 421}