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:
parent
62e9fa4a38
commit
6a6d50e5f8
|
|
@ -145,11 +145,12 @@ class ArmorPlate:
|
||||||
item_id: str
|
item_id: str
|
||||||
protection: ProtectionProfile = field(default_factory=ProtectionProfile)
|
protection: ProtectionProfile = field(default_factory=ProtectionProfile)
|
||||||
durability: int = 2000 # Plate durability affects economy
|
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)
|
block_chance: Decimal = Decimal("0") # Chance to nullify hit completely (no decay)
|
||||||
|
|
||||||
# Constants
|
# Constants
|
||||||
BASE_DECAY_FACTOR: Decimal = Decimal("0.05")
|
BASE_DECAY_FACTOR: ClassVar[Decimal] = Decimal("0.05")
|
||||||
MAX_DURABILITY: int = 100000
|
MAX_DURABILITY: ClassVar[int] = 100000
|
||||||
|
|
||||||
def get_total_protection(self) -> Decimal:
|
def get_total_protection(self) -> Decimal:
|
||||||
"""Get total protection value."""
|
"""Get total protection value."""
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue