2023-04-29 14:59:16 +00:00
|
|
|
from typing import ClassVar
|
|
|
|
|
2023-05-02 10:20:27 +00:00
|
|
|
from model.other import ItemCount
|
|
|
|
from utils.model import BaseModel
|
|
|
|
|
2023-04-29 14:59:16 +00:00
|
|
|
__all__ = (
|
|
|
|
"Talent",
|
|
|
|
"CombatTalent",
|
|
|
|
"NormalAttack",
|
|
|
|
"ElementalBurst",
|
|
|
|
"ElementalSkill",
|
|
|
|
"AlternateSprint",
|
|
|
|
"PassiveTalent",
|
|
|
|
"AscensionPassive",
|
|
|
|
"FirstAscensionPassive",
|
|
|
|
"FourthAscensionPassive",
|
|
|
|
"UtilityPassive",
|
|
|
|
"MiscellaneousPassive",
|
|
|
|
"AvatarTalents",
|
2023-05-02 10:20:27 +00:00
|
|
|
"TalentAttribute",
|
2023-04-29 14:59:16 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
|
2023-05-02 10:20:27 +00:00
|
|
|
class TalentAttribute(BaseModel):
|
2023-05-02 12:43:01 +00:00
|
|
|
level: int = 1
|
2023-05-02 10:20:27 +00:00
|
|
|
"""等级"""
|
2023-05-02 12:43:01 +00:00
|
|
|
param_descriptions: list[str] = []
|
2023-05-02 10:20:27 +00:00
|
|
|
"""参数描述"""
|
2023-05-02 12:43:01 +00:00
|
|
|
param_list: list[float] = []
|
2023-05-02 10:20:27 +00:00
|
|
|
"""参数列表"""
|
|
|
|
|
|
|
|
break_level: int = 0
|
|
|
|
"""所需突破等级"""
|
|
|
|
coin: int = 0
|
|
|
|
"""摩拉"""
|
|
|
|
cost_items: list[ItemCount] = []
|
|
|
|
"""消耗物品"""
|
|
|
|
|
|
|
|
|
2023-04-29 14:59:16 +00:00
|
|
|
class Talent(BaseModel):
|
|
|
|
name: str
|
|
|
|
"""天赋名称"""
|
|
|
|
description: str
|
|
|
|
"""天赋描述"""
|
|
|
|
icon: str
|
|
|
|
"""图标"""
|
2023-05-02 12:43:01 +00:00
|
|
|
promote_level: int = 0
|
2023-04-29 14:59:16 +00:00
|
|
|
"""解锁等级"""
|
|
|
|
|
|
|
|
|
|
|
|
class CombatTalent(Talent):
|
|
|
|
"""战斗天赋"""
|
|
|
|
|
|
|
|
cooldown: float = 0
|
|
|
|
"""冷却时间"""
|
|
|
|
|
2023-05-02 12:43:01 +00:00
|
|
|
attributes: list[TalentAttribute]
|
|
|
|
"""数值参数列表"""
|
|
|
|
|
2023-04-29 14:59:16 +00:00
|
|
|
|
|
|
|
class NormalAttack(CombatTalent):
|
|
|
|
"""普通攻击"""
|
|
|
|
|
|
|
|
|
|
|
|
class ElementalSkill(CombatTalent):
|
|
|
|
"""元素战技"""
|
|
|
|
|
|
|
|
|
|
|
|
class ElementalBurst(CombatTalent):
|
|
|
|
"""元素爆发"""
|
|
|
|
|
|
|
|
|
|
|
|
class AlternateSprint(CombatTalent):
|
|
|
|
"""冲刺技能"""
|
|
|
|
|
|
|
|
|
|
|
|
class PassiveTalent(Talent):
|
2023-05-02 12:43:01 +00:00
|
|
|
"""固有天赋"""
|
|
|
|
|
|
|
|
attribute: TalentAttribute
|
|
|
|
"""数值参数"""
|
2023-04-29 14:59:16 +00:00
|
|
|
|
|
|
|
|
|
|
|
class AscensionPassive(PassiveTalent):
|
2023-05-02 12:43:01 +00:00
|
|
|
"""突破固有天赋"""
|
2023-04-29 14:59:16 +00:00
|
|
|
|
|
|
|
ascension: ClassVar[int]
|
|
|
|
|
|
|
|
|
|
|
|
class FirstAscensionPassive(AscensionPassive):
|
2023-05-02 12:43:01 +00:00
|
|
|
"""第一次突破固有天赋"""
|
2023-04-29 14:59:16 +00:00
|
|
|
|
|
|
|
ascension = 1
|
|
|
|
|
|
|
|
|
|
|
|
class FourthAscensionPassive(AscensionPassive):
|
2023-05-02 12:43:01 +00:00
|
|
|
"""第四次突破固有天赋"""
|
2023-04-29 14:59:16 +00:00
|
|
|
|
|
|
|
ascension = 4
|
|
|
|
|
|
|
|
|
|
|
|
class UtilityPassive(PassiveTalent):
|
2023-05-02 12:43:01 +00:00
|
|
|
"""实用固有天赋"""
|
2023-04-29 14:59:16 +00:00
|
|
|
|
|
|
|
|
|
|
|
class MiscellaneousPassive(PassiveTalent):
|
2023-05-02 12:43:01 +00:00
|
|
|
"""杂项固有天赋"""
|
2023-04-29 14:59:16 +00:00
|
|
|
|
|
|
|
|
|
|
|
class AvatarTalents(BaseModel):
|
|
|
|
"""角色天赋"""
|
|
|
|
|
|
|
|
normal_attack: NormalAttack
|
|
|
|
"""普通攻击"""
|
2023-05-02 14:21:08 +00:00
|
|
|
elemental_skill: ElementalSkill | None
|
2023-04-29 14:59:16 +00:00
|
|
|
"""元素战技"""
|
2023-05-02 14:21:08 +00:00
|
|
|
elemental_burst: ElementalBurst | None
|
2023-04-29 14:59:16 +00:00
|
|
|
"""元素爆发"""
|
|
|
|
alternate_sprint: AlternateSprint | None = None
|
|
|
|
"""冲刺技能"""
|
|
|
|
|
2023-05-02 14:21:08 +00:00
|
|
|
first_ascension_passive: FirstAscensionPassive | None
|
2023-05-02 12:43:01 +00:00
|
|
|
"""第一次突破固有天赋"""
|
2023-05-02 14:21:08 +00:00
|
|
|
fourth_ascension_passive: FourthAscensionPassive | None
|
2023-05-02 12:43:01 +00:00
|
|
|
"""第四次突破固有天赋"""
|
2023-04-29 14:59:16 +00:00
|
|
|
utility_passive: UtilityPassive | None = None
|
2023-05-02 12:43:01 +00:00
|
|
|
"""实用固有天赋"""
|
2023-04-29 14:59:16 +00:00
|
|
|
miscellaneous_passive: MiscellaneousPassive | None = None
|
2023-05-02 12:43:01 +00:00
|
|
|
"""杂项固有天赋"""
|