Add PvpDamageInformation insight

This commit is contained in:
2026-04-30 21:43:24 +00:00
parent df62da1d6e
commit 55f769ca1e
3 changed files with 100 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
<?php
namespace IndifferentKetchup\Codex\Analysis\ProjectZomboid;
use IndifferentKetchup\Codex\Analysis\Information;
use IndifferentKetchup\Codex\Analysis\PatternInsightInterface;
use IndifferentKetchup\Codex\Pattern\ProjectZomboid\PvpPattern;
class PvpDamageInformation extends Information implements PatternInsightInterface
{
public static function getPatterns(): array
{
return [PvpPattern::COMBAT_REAL];
}
public function setMatches(array $matches, mixed $patternKey): void
{
$this->setLabel('PvP combat');
$this->setValue(sprintf(
'%s hit %s with %s',
$matches['attacker'],
$matches['victim'],
$matches['weapon']
));
}
}