mirror of
https://github.com/PaiGramTeam/SIMNet.git
synced 2024-11-22 06:17:57 +00:00
✨ Support starrail activity - BoxingShow
This commit is contained in:
parent
c5eb06a3d2
commit
20b7211b04
@ -30,6 +30,7 @@ class RogueCharacter(StarRailBaseCharacter):
|
|||||||
|
|
||||||
level: int
|
level: int
|
||||||
rank: int
|
rank: int
|
||||||
|
is_trial: bool = False
|
||||||
|
|
||||||
|
|
||||||
class ActivityCharacter(StarRailBaseCharacter):
|
class ActivityCharacter(StarRailBaseCharacter):
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
from typing import List, Optional, Dict
|
from typing import List, Optional, Dict
|
||||||
|
|
||||||
from simnet.models.base import APIModel
|
from simnet.models.base import APIModel
|
||||||
from simnet.models.starrail.character import ActivityCharacter
|
from simnet.models.starrail.character import ActivityCharacter, RogueCharacter
|
||||||
|
|
||||||
from .base import PartialTime
|
from .base import PartialTime
|
||||||
|
|
||||||
@ -250,6 +250,44 @@ class StarRailFoxStory(StarRailActivityBase):
|
|||||||
info: StarRailFoxStoryInfo
|
info: StarRailFoxStoryInfo
|
||||||
|
|
||||||
|
|
||||||
|
class StarRailBoxingShowBuffsUsedActivity(APIModel):
|
||||||
|
"""Boxing Show Buffs Used Activity"""
|
||||||
|
|
||||||
|
id: int
|
||||||
|
name_mi18n: str
|
||||||
|
desc_mi18n: str
|
||||||
|
|
||||||
|
|
||||||
|
class StarRailBoxingShowInfoItem(APIModel):
|
||||||
|
"""Boxing Show Info Item"""
|
||||||
|
|
||||||
|
name_mi18n: str
|
||||||
|
round: int
|
||||||
|
is_perfect: bool
|
||||||
|
has_challenge: bool
|
||||||
|
challenge_id: int
|
||||||
|
avatars_used_activity: List[RogueCharacter]
|
||||||
|
buffs_used_activity: List[StarRailBoxingShowBuffsUsedActivity]
|
||||||
|
|
||||||
|
@property
|
||||||
|
def buffs(self) -> str:
|
||||||
|
"""Get the buffs as a string."""
|
||||||
|
return "、".join([i.name_mi18n for i in self.buffs_used_activity])
|
||||||
|
|
||||||
|
|
||||||
|
class StarRailBoxingShowInfo(APIModel):
|
||||||
|
"""Boxing Show Info"""
|
||||||
|
|
||||||
|
list: List[StarRailBoxingShowInfoItem]
|
||||||
|
exists_data: bool = False
|
||||||
|
|
||||||
|
|
||||||
|
class StarRailBoxingShow(StarRailActivityBase):
|
||||||
|
"""Boxing Show Activity"""
|
||||||
|
|
||||||
|
info: StarRailBoxingShowInfo
|
||||||
|
|
||||||
|
|
||||||
class StarRailActivity(APIModel):
|
class StarRailActivity(APIModel):
|
||||||
"""Starrail chronicle activity."""
|
"""Starrail chronicle activity."""
|
||||||
|
|
||||||
@ -286,3 +324,8 @@ class StarRailActivity(APIModel):
|
|||||||
def fox_story(self) -> StarRailFoxStory:
|
def fox_story(self) -> StarRailFoxStory:
|
||||||
"""Get the fox story activity."""
|
"""Get the fox story activity."""
|
||||||
return StarRailFoxStory(**self.find_activity("fox_story"))
|
return StarRailFoxStory(**self.find_activity("fox_story"))
|
||||||
|
|
||||||
|
@property
|
||||||
|
def boxing_show(self) -> StarRailBoxingShow:
|
||||||
|
"""Get the boxing show activity."""
|
||||||
|
return StarRailBoxingShow(**self.find_activity("boxing_show"))
|
||||||
|
Loading…
Reference in New Issue
Block a user