feat(api): add ItemRarity enum to item system
- Add ItemRarity enum with 5 tiers (common, uncommon, rare, epic, legendary) - Add rarity field to Item dataclass with COMMON default - Update Item serialization (to_dict/from_dict) for rarity - Export ItemRarity from models package - Add 24 comprehensive unit tests for Item and ItemRarity Part of Phase 4 Week 2: Inventory & Equipment System (Task 2.1)
This commit is contained in:
@@ -40,6 +40,16 @@ class ItemType(Enum):
|
||||
QUEST_ITEM = "quest_item" # Story-related, non-tradeable
|
||||
|
||||
|
||||
class ItemRarity(Enum):
|
||||
"""Item rarity tiers affecting drop rates, value, and visual styling."""
|
||||
|
||||
COMMON = "common" # White/gray - basic items
|
||||
UNCOMMON = "uncommon" # Green - slightly better
|
||||
RARE = "rare" # Blue - noticeably better
|
||||
EPIC = "epic" # Purple - powerful items
|
||||
LEGENDARY = "legendary" # Orange/gold - best items
|
||||
|
||||
|
||||
class StatType(Enum):
|
||||
"""Character attribute types."""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user