SIMNet/simnet/models/starrail/chronicle/challenge.py

48 lines
997 B
Python
Raw Normal View History

2023-06-09 14:55:51 +00:00
"""Starrail chronicle challenge."""
2024-03-29 13:48:07 +00:00
2023-06-09 14:55:51 +00:00
from typing import List
from pydantic import Field
from simnet.models.base import APIModel
2023-12-30 02:01:36 +00:00
from simnet.models.starrail.character import RogueCharacter
2023-06-09 14:55:51 +00:00
from .base import PartialTime
__all__ = ["StarRailFloor", "FloorNode", "StarRailChallenge"]
class FloorNode(APIModel):
"""Node for a floor."""
challenge_time: PartialTime
2023-12-30 02:01:36 +00:00
avatars: List[RogueCharacter]
2023-06-09 14:55:51 +00:00
class StarRailFloor(APIModel):
"""Floor in a challenge."""
name: str
round_num: int
star_num: int
node_1: FloorNode
node_2: FloorNode
is_chaos: bool
2023-12-30 02:01:36 +00:00
is_fast: bool
maze_id: int
2023-06-09 14:55:51 +00:00
class StarRailChallenge(APIModel):
"""Challenge in a season."""
season: int = Field(alias="schedule_id")
begin_time: PartialTime
end_time: PartialTime
total_stars: int = Field(alias="star_num")
max_floor: str
total_battles: int = Field(alias="battle_num")
has_data: bool
floors: List[StarRailFloor] = Field(alias="all_floor_detail")