Clash.Meta/mihomo/models/combat.py

113 lines
3.0 KiB
Python
Raw Normal View History

2023-06-10 22:47:57 +08:00
from pydantic import BaseModel
class Element(BaseModel):
"""
Represents an element.
Attributes:
- id (`str`): The ID of the element.
- name (`str`): The name of the element.
- color (`str`): The color of the element.
- icon (`str`): The element icon.
"""
id: str
"""The ID of the element"""
name: str
"""The name of the element"""
color: str
"""The color of the element"""
icon: str
"""The element icon"""
class Path(BaseModel):
"""
Paths are congregations of Imaginary energy, with which the ideals harmonize.
Attributes:
- id (`str`): The ID of the path.
- name (`str`): The name of the path.
- icon (`str`): The path icon.
"""
id: str
"""The ID of the path"""
name: str
"""The name of the path"""
icon: str
"""The path icon"""
2023-06-10 22:47:57 +08:00
class Trace(BaseModel):
"""
2023-06-10 22:47:57 +08:00
Represents a character's skill trace.
Attributes:
2023-06-10 22:47:57 +08:00
- id (`int`): The ID of the trace.
- name (`str`): The name of the trace.
- level (`int`): The current level of the trace.
- max_level (`int`): The maximum level of the trace.
- element (`Element` | None): The element of the trace, or None if not applicable.
- type (`str`): The type of the trace.
- type_text (`str`): The type text of the trace.
- effect (`str`): The effect of the trace.
- effect_text (`str`): The effect text of the trace.
- simple_desc (`str`): The simple description of the trace.
- desc (`str`): The detailed description of the trace.
- icon (`str`): The trace icon.
"""
2023-06-10 22:47:57 +08:00
id: int
"""The ID of the trace"""
name: str
2023-06-10 22:47:57 +08:00
"""The name of the trace"""
level: int
"""The current level of the trace"""
max_level: int
"""The maximum level of the trace"""
element: Element | None = None
"""The element of the trace"""
type: str
"""The type of the trace"""
type_text: str
"""The type text of the trace"""
effect: str
"""The effect of the trace"""
effect_text: str
"""The effect text of the trace"""
simple_desc: str
"""The simple description of the trace"""
desc: str
"""The detailed description of the trace"""
icon: str
2023-06-10 22:47:57 +08:00
"""The trace icon"""
2023-06-10 22:47:57 +08:00
class TraceTreeNode(BaseModel):
"""
2023-06-10 22:47:57 +08:00
Represents a node in the trace skill tree of a character.
Attributes:
2023-06-10 22:47:57 +08:00
- id (`int`): The ID of the trace.
- level (`int`): The level of the trace.
- max_level (`int`): The max level of the trace.
2023-06-10 22:47:57 +08:00
- icon (`str`): The icon of the trace.
- anchor (`str`): The position of the trace tree node.
- parent (`int` | `None`): The preceding node id of trace.
"""
2023-06-10 22:47:57 +08:00
id: int
"""The ID of the trace"""
level: int
"""The level of the trace"""
max_level: int
"""The max level of the trace"""
icon: str
2023-06-10 22:47:57 +08:00
"""The icon of the trace"""
anchor: str
"""The position of the trace tree node"""
parent: int | None = None
"""The preceding node id of trace"""