Show AC on each tracker row

Combatant snapshots armor_class from the enemy when added (like maxHp),
shown as an "AC n" pill next to the name for quick hit checks. Migration
backfills existing combatants from their enemy.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Frank
2026-09-06 19:34:24 +02:00
co-authored by Claude Sonnet 5
parent 2ed169fc78
commit cb23d5b9ac
4 changed files with 48 additions and 0 deletions
+15
View File
@@ -30,6 +30,9 @@ class Combatant
#[ORM\Column(length: 120)]
private string $label = '';
#[ORM\Column(type: Types::SMALLINT)]
private int $armorClass = 10;
#[ORM\Column(type: Types::SMALLINT)]
private int $maxHp = 1;
@@ -113,6 +116,18 @@ class Combatant
return $this;
}
public function getArmorClass(): int
{
return $this->armorClass;
}
public function setArmorClass(int $armorClass): static
{
$this->armorClass = $armorClass;
return $this;
}
public function getMaxHp(): int
{
return $this->maxHp;