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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user