2023-04-26 08:48:05 +00:00
|
|
|
# 光锥
|
|
|
|
from pydantic import BaseModel
|
|
|
|
|
|
|
|
from .enums import Quality, Destiny
|
|
|
|
from .material import Material
|
|
|
|
|
|
|
|
|
|
|
|
class LightConeItem(BaseModel):
|
|
|
|
item: Material
|
|
|
|
"""物品"""
|
|
|
|
count: int
|
|
|
|
"""数量"""
|
|
|
|
|
|
|
|
|
|
|
|
class LightConePromote(BaseModel):
|
|
|
|
required_level: int
|
|
|
|
"""突破所需等级"""
|
|
|
|
promote_level: int = 0
|
|
|
|
"""突破等级"""
|
|
|
|
max_level: int
|
|
|
|
"""解锁的等级上限"""
|
|
|
|
|
|
|
|
coin: int = 0
|
|
|
|
"""信用点"""
|
|
|
|
items: list[LightConeItem]
|
|
|
|
"""突破所需材料"""
|
|
|
|
|
|
|
|
|
|
|
|
class LightCone(BaseModel):
|
|
|
|
id: int
|
|
|
|
""""光锥ID"""
|
|
|
|
name: str
|
|
|
|
"""名称"""
|
|
|
|
desc: str
|
|
|
|
"""描述"""
|
|
|
|
icon: str
|
|
|
|
"""图标"""
|
|
|
|
big_pic: str
|
|
|
|
"""大图"""
|
|
|
|
quality: Quality
|
|
|
|
"""稀有度"""
|
|
|
|
destiny: Destiny
|
|
|
|
"""命途"""
|
|
|
|
promote: list[LightConePromote]
|
|
|
|
"""晋阶信息"""
|
2023-05-11 15:09:39 +00:00
|
|
|
|
|
|
|
@property
|
|
|
|
def rarity(self) -> int:
|
|
|
|
return 5 - list(Quality).index(self.quality)
|