diff --git a/docs/contests/THUAI8/interface/interfacepython.md b/docs/contests/THUAI8/interface/interfacepython.md index 60adaf07..e3989d3b 100644 --- a/docs/contests/THUAI8/interface/interfacepython.md +++ b/docs/contests/THUAI8/interface/interfacepython.md @@ -125,6 +125,8 @@ def GetEconomyResourceState(self, cellX: int, cellY: int) -> THUAI8.EconomyResou print("该位置没有经济资源") ``` + + #### GetAdditionResourceState ```python def GetAdditionResourceState(self, cellX: int, cellY: int) -> THUAI8.AdditionResource @@ -156,6 +158,29 @@ def GetAdditionResourceState(self, cellX: int, cellY: int) -> THUAI8.AdditionRes print("该位置没有加成资源") ``` +#### GetTrapState +```python +def GetTrapState(self, cellX: int, cellY: int) -> THUAI8.Trap +``` +- **参数**: + - `cellX`: 格子X坐标 + - `cellY`: 格子Y坐标 +- **返回值**: `Trap` 结构体,包含以下字段: + ```python + class Trap: + def __init__( + self, + trapType: TrapType = TrapType.NullTrapType, + teamID: int = 0, + trapValid: bool = False, + ): + self.trapType = trapType + self.teamID = teamID + self.trapValid = trapValid + ``` +- **说明**: + - 若指定位置无陷阱,返回默认值(所有字段为0或Null) + #### GetConstructionState ```python def GetConstructionState(self, cellX: int, cellY: int) -> THUAI8.ConstructionState @@ -359,14 +384,6 @@ def InstallEquipment(self, playerID: int, equipmentType: THUAI8.EquipmentType) - - `equipmentType`: 装备类型 - **返回值**: `Future[bool]`,表示安装装备指令是否成功发送 -#### Recycle -```python -def Recycle(self, playerID: int) -> Future[bool] -``` -- **参数**: - - `playerID`: 待回收角色的ID -- **返回值**: `Future[bool]`,表示回收指令是否成功发送 - #### BuildCharacter ```python def BuildCharacter(self, characterType: THUAI8.CharacterType, birthIndex: int) -> Future[bool]