Feat/hidden domain (#113)

Summary
新增秘境探索,属于多人活动,每N年触发一次
Closes #105
This commit is contained in:
4thfever
2026-01-31 20:43:42 +08:00
committed by GitHub
parent efa663febe
commit 0315dca6e6
34 changed files with 843 additions and 29 deletions

View File

@@ -194,6 +194,7 @@ def load_game(save_path: Optional[Path] = None) -> Tuple["World", "Simulator", L
# 读取世界数据
world_data = save_data.get("world", {})
month_stamp = MonthStamp(world_data["month_stamp"])
start_year = world_data.get("start_year", 100)
# 计算事件数据库路径。
events_db_path = get_events_db_path(save_path)
@@ -203,6 +204,7 @@ def load_game(save_path: Optional[Path] = None) -> Tuple["World", "Simulator", L
map=game_map,
month_stamp=month_stamp,
events_db_path=events_db_path,
start_year=start_year,
)
# 恢复世界历史

View File

@@ -117,6 +117,7 @@ def save_game(
world_data = {
"month_stamp": int(world.month_stamp),
"start_year": world.start_year,
"existed_sect_ids": [sect.id for sect in existed_sects],
# 天地灵机
"current_phenomenon_id": world.current_phenomenon.id if world.current_phenomenon else None,

View File

@@ -267,6 +267,10 @@ class Simulator:
Gathering 结算阶段:
检查并执行注册的多人聚集事件(如拍卖会、大比等)。
"""
# 第一年不触发聚集事件,给予发育缓冲
if self.world.month_stamp.get_year() <= self.world.start_year:
return []
return await self.world.gathering_manager.check_and_run_all(self.world)
def _phase_update_celestial_phenomenon(self):