feat: support curated abilities and objective victory

This commit is contained in:
Keith Solomon authored and Keith Solomon committed 2026-07-05 19:49:06 -05:00
1 parent 088e85c9b4
commit 6befe7b3e2
3 files changed
+477 -17

No files matched your search

+9
View File
@@ -112,6 +112,15 @@ final readonly class UnitState
return $this->copy(health: max(0, $this->health - max(0, $damage)));
}
public function restoreHealth(int $amount): self
{
if ($amount < 0) {
throw new InvalidArgumentException('Restore health amount cannot be negative.');
}
return $this->copy(health: min($this->maxHealth, $this->health + $amount));
}
public function markAttacked(): self
{
return $this->copy(hasAttacked: true);