diff --git a/core/armor_system.py b/core/armor_system.py index 815e1c7..91ff914 100644 --- a/core/armor_system.py +++ b/core/armor_system.py @@ -13,7 +13,7 @@ Implements Entropia Universe armor mechanics: from dataclasses import dataclass, field from decimal import Decimal -from typing import Optional, Dict, List, Tuple +from typing import Optional, Dict, List, Tuple, ClassVar from enum import Enum, auto @@ -232,14 +232,15 @@ class ArmorPiece: protection: ProtectionProfile = field(default_factory=ProtectionProfile) durability: int = 2000 # Durability affects economy weight: Decimal = Decimal("1.0") # Weight in kg - - # Base decay factor: 0.05 PEC per HP (20 hp/pec standard) - BASE_DECAY_FACTOR: Decimal = Decimal("0.05") - MAX_DURABILITY: int = 100000 + decay_per_hp: Decimal = Decimal("0.05") # PEC per HP absorbed (0.05 = 20 hp/pec) # Optional plate attachment attached_plate: Optional[ArmorPlate] = None + # Class constants (not instance fields) + BASE_DECAY_FACTOR: ClassVar[Decimal] = Decimal("0.05") + MAX_DURABILITY: ClassVar[int] = 100000 + def get_base_protection(self) -> ProtectionProfile: """Get base protection without plate.""" return self.protection