add occupy action
This commit is contained in:
@@ -82,7 +82,7 @@ class MoveToDirection(DefineAction, ActualActionMixin):
|
||||
self.start_monthstamp = self.world.month_stamp
|
||||
self.direction = direction
|
||||
direction_cn = Direction.get_cn_name(direction)
|
||||
return Event(self.world.month_stamp, f"{self.avatar.name} 开始向{direction_cn}方探索未知区域", related_avatars=[self.avatar.id])
|
||||
return Event(self.world.month_stamp, f"{self.avatar.name} 开始向{direction_cn}方移动", related_avatars=[self.avatar.id])
|
||||
|
||||
def step(self, direction: str) -> ActionResult:
|
||||
# 确保方向已设置
|
||||
@@ -108,7 +108,7 @@ class MoveToDirection(DefineAction, ActualActionMixin):
|
||||
|
||||
async def finish(self, direction: str) -> list[Event]:
|
||||
direction_cn = Direction.get_cn_name(direction)
|
||||
return [Event(self.world.month_stamp, f"{self.avatar.name} 结束了向{direction_cn}方的探索", related_avatars=[self.avatar.id])]
|
||||
return [Event(self.world.month_stamp, f"{self.avatar.name} 结束了向{direction_cn}方的移动", related_avatars=[self.avatar.id])]
|
||||
|
||||
def _execute(self, *args, **kwargs):
|
||||
pass
|
||||
@@ -101,7 +101,7 @@ class Region(ABC):
|
||||
}
|
||||
|
||||
|
||||
@dataclass
|
||||
@dataclass(eq=False)
|
||||
class NormalRegion(Region):
|
||||
"""普通区域"""
|
||||
animal_ids: list[int] = field(default_factory=list)
|
||||
@@ -171,7 +171,7 @@ class NormalRegion(Region):
|
||||
return info
|
||||
|
||||
|
||||
@dataclass
|
||||
@dataclass(eq=False)
|
||||
class CultivateRegion(Region):
|
||||
"""修炼区域"""
|
||||
essence_type: EssenceType = EssenceType.GOLD # 默认值避免 dataclass 继承错误
|
||||
@@ -225,7 +225,7 @@ class CultivateRegion(Region):
|
||||
return info
|
||||
|
||||
|
||||
@dataclass
|
||||
@dataclass(eq=False)
|
||||
class CityRegion(Region):
|
||||
"""城市区域"""
|
||||
def get_region_type(self) -> str:
|
||||
|
||||
@@ -4,7 +4,7 @@ from pathlib import Path
|
||||
from src.classes.region import Region
|
||||
|
||||
|
||||
@dataclass
|
||||
@dataclass(eq=False)
|
||||
class SectRegion(Region):
|
||||
"""
|
||||
宗门总部区域:仅用于显示宗门总部的名称与描述。
|
||||
|
||||
Reference in New Issue
Block a user