From fcbd8293035817811eb43052ec0d98b1666ca419 Mon Sep 17 00:00:00 2001 From: bridge Date: Sun, 12 Oct 2025 01:42:16 +0800 Subject: [PATCH] update get info --- src/classes/avatar.py | 4 ++-- src/classes/cultivation.py | 9 +++------ 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/classes/avatar.py b/src/classes/avatar.py index 828097c..fe0ae4f 100644 --- a/src/classes/avatar.py +++ b/src/classes/avatar.py @@ -432,7 +432,7 @@ class Avatar: if co_region_avatars: entries: list[str] = [] for other in co_region_avatars[:8]: - entries.append(f"{other.name}(境界:{other.cultivation_progress.get_simple_info()})") + entries.append(f"{other.name}(境界:{other.cultivation_progress.get_info()})") co_region_info = "\n观测范围内角色:" + (",".join(entries) if entries else "无") # 历史事件摘要 @@ -555,7 +555,7 @@ class Avatar: """ relation = self.get_relation(other_avatar) relation_str = str(relation) - return f"{other_avatar.name},境界:{other_avatar.cultivation_progress.get_simple_info()},关系:{relation_str},阵营:{other_avatar.alignment}" + return f"{other_avatar.name},境界:{other_avatar.cultivation_progress.get_info()},关系:{relation_str},阵营:{other_avatar.alignment}" @property def move_step_length(self) -> int: diff --git a/src/classes/cultivation.py b/src/classes/cultivation.py index 4551bc7..5a3a398 100644 --- a/src/classes/cultivation.py +++ b/src/classes/cultivation.py @@ -98,16 +98,13 @@ class CultivationProgress: """ return REALM_TO_MOVE_STEP[self.realm] - def __str__(self) -> str: - return self.get_info() - - def get_info(self) -> str: + def get_detailed_info(self) -> str: can_break_through = self.can_break_through() can_break_through_str = "可以突破" if can_break_through else "不可以突破" return f"{self.realm.value}{self.stage.value}({self.level}级){can_break_through_str}" - def get_detailed_info(self) -> str: - return self.get_info() + def get_info(self) -> str: + return f"{self.realm.value}{self.stage.value}" def get_exp_required(self) -> int: """