From 6a6d50e5f835ab66fc9d380d79967ae1d3b80ff0 Mon Sep 17 00:00:00 2001 From: LemonNexus Date: Mon, 9 Feb 2026 11:26:49 +0000 Subject: [PATCH] fix(armor): add decay_per_hp field to ArmorPlate - Added decay_per_hp field with default 0.05 - Changed constants to ClassVar like ArmorPiece --- core/armor_system.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/armor_system.py b/core/armor_system.py index 599b5b4..8b3352e 100644 --- a/core/armor_system.py +++ b/core/armor_system.py @@ -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."""