fix(armor): add decay_per_hp field to ArmorPlate

- Added decay_per_hp field with default 0.05
- Changed constants to ClassVar like ArmorPiece
This commit is contained in:
LemonNexus 2026-02-09 11:26:49 +00:00
parent 62e9fa4a38
commit 6a6d50e5f8
1 changed files with 3 additions and 2 deletions

View File

@ -145,11 +145,12 @@ class ArmorPlate:
item_id: str
protection: ProtectionProfile = field(default_factory=ProtectionProfile)
durability: int = 2000 # Plate durability affects economy
decay_per_hp: Decimal = Decimal("0.05") # PEC per HP absorbed
block_chance: Decimal = Decimal("0") # Chance to nullify hit completely (no decay)
# Constants
BASE_DECAY_FACTOR: Decimal = Decimal("0.05")
MAX_DURABILITY: int = 100000
BASE_DECAY_FACTOR: ClassVar[Decimal] = Decimal("0.05")
MAX_DURABILITY: ClassVar[int] = 100000
def get_total_protection(self) -> Decimal:
"""Get total protection value."""