Spaces:
Running
Running
茂道
commited on
Commit
·
b362bc7
1
Parent(s):
6a973d2
update
Browse files- .idea/workspace.xml +15 -3
- werewolf/app.py +0 -2
- werewolf/hunter/__pycache__/hunter_agent.cpython-312.pyc +0 -0
- werewolf/hunter/__pycache__/prompt.cpython-312.pyc +0 -0
- werewolf/hunter/hunter_agent.py +0 -91
- werewolf/hunter/prompt.py +0 -37
- werewolf/seer/__pycache__/seer_agent.cpython-312.pyc +0 -0
- werewolf/seer/seer_agent.py +3 -3
- werewolf/villager/__pycache__/villager_agent.cpython-312.pyc +0 -0
- werewolf/villager/villager_agent.py +2 -2
- werewolf/witch/__pycache__/witch_agent.cpython-312.pyc +0 -0
- werewolf/witch/witch_agent.py +3 -3
- werewolf/wolf/__pycache__/wolf_agent.cpython-312.pyc +0 -0
- werewolf/wolf/wolf_agent.py +4 -4
.idea/workspace.xml
CHANGED
@@ -2,7 +2,8 @@
|
|
2 |
<project version="4">
|
3 |
<component name="ChangeListManager">
|
4 |
<list default="true" id="be0bdb17-6f52-4720-b934-341fa7978d29" name="Changes" comment="">
|
5 |
-
<change beforePath="$PROJECT_DIR
|
|
|
6 |
</list>
|
7 |
<option name="SHOW_DIALOG" value="false" />
|
8 |
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
@@ -70,7 +71,7 @@
|
|
70 |
<option name="number" value="Default" />
|
71 |
<option name="presentableId" value="Default" />
|
72 |
<updated>1745132074997</updated>
|
73 |
-
<workItem from="1745132078229" duration="
|
74 |
</task>
|
75 |
<servers />
|
76 |
</component>
|
@@ -88,7 +89,18 @@
|
|
88 |
</map>
|
89 |
</option>
|
90 |
</component>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
91 |
<component name="com.intellij.coverage.CoverageDataManagerImpl">
|
92 |
-
<SUITE FILE_PATH="coverage/werewolf_1$app.coverage" NAME="app Coverage Results" MODIFIED="
|
93 |
</component>
|
94 |
</project>
|
|
|
2 |
<project version="4">
|
3 |
<component name="ChangeListManager">
|
4 |
<list default="true" id="be0bdb17-6f52-4720-b934-341fa7978d29" name="Changes" comment="">
|
5 |
+
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
6 |
+
<change beforePath="$PROJECT_DIR$/requirements.txt" beforeDir="false" afterPath="$PROJECT_DIR$/requirements.txt" afterDir="false" />
|
7 |
</list>
|
8 |
<option name="SHOW_DIALOG" value="false" />
|
9 |
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
|
|
71 |
<option name="number" value="Default" />
|
72 |
<option name="presentableId" value="Default" />
|
73 |
<updated>1745132074997</updated>
|
74 |
+
<workItem from="1745132078229" duration="3033000" />
|
75 |
</task>
|
76 |
<servers />
|
77 |
</component>
|
|
|
89 |
</map>
|
90 |
</option>
|
91 |
</component>
|
92 |
+
<component name="XDebuggerManager">
|
93 |
+
<breakpoint-manager>
|
94 |
+
<breakpoints>
|
95 |
+
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
|
96 |
+
<url>file://$PROJECT_DIR$/../ali_open_manus/open-manus/venv/lib/python3.12/site-packages/agent_build_sdk/server/server.py</url>
|
97 |
+
<line>81</line>
|
98 |
+
<option name="timeStamp" value="1" />
|
99 |
+
</line-breakpoint>
|
100 |
+
</breakpoints>
|
101 |
+
</breakpoint-manager>
|
102 |
+
</component>
|
103 |
<component name="com.intellij.coverage.CoverageDataManagerImpl">
|
104 |
+
<SUITE FILE_PATH="coverage/werewolf_1$app.coverage" NAME="app Coverage Results" MODIFIED="1745137162588" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/werewolf" />
|
105 |
</component>
|
106 |
</project>
|
werewolf/app.py
CHANGED
@@ -1,7 +1,6 @@
|
|
1 |
import os
|
2 |
|
3 |
from agent_build_sdk.builder import AgentBuilder
|
4 |
-
from hunter.hunter_agent import HunterAgent
|
5 |
from seer.seer_agent import SeerAgent
|
6 |
from villager.villager_agent import VillagerAgent
|
7 |
from witch.witch_agent import WitchAgent
|
@@ -16,6 +15,5 @@ if __name__ == '__main__':
|
|
16 |
agent.register_role_agent(ROLE_WOLF, WolfAgent())
|
17 |
agent.register_role_agent(ROLE_SEER, SeerAgent())
|
18 |
agent.register_role_agent(ROLE_WITCH, WitchAgent())
|
19 |
-
agent.register_role_agent(ROLE_HUNTER, HunterAgent())
|
20 |
agent_builder = AgentBuilder(name, agent=agent)
|
21 |
agent_builder.start()
|
|
|
1 |
import os
|
2 |
|
3 |
from agent_build_sdk.builder import AgentBuilder
|
|
|
4 |
from seer.seer_agent import SeerAgent
|
5 |
from villager.villager_agent import VillagerAgent
|
6 |
from witch.witch_agent import WitchAgent
|
|
|
15 |
agent.register_role_agent(ROLE_WOLF, WolfAgent())
|
16 |
agent.register_role_agent(ROLE_SEER, SeerAgent())
|
17 |
agent.register_role_agent(ROLE_WITCH, WitchAgent())
|
|
|
18 |
agent_builder = AgentBuilder(name, agent=agent)
|
19 |
agent_builder.start()
|
werewolf/hunter/__pycache__/hunter_agent.cpython-312.pyc
DELETED
Binary file (7.6 kB)
|
|
werewolf/hunter/__pycache__/prompt.cpython-312.pyc
DELETED
Binary file (2.36 kB)
|
|
werewolf/hunter/hunter_agent.py
DELETED
@@ -1,91 +0,0 @@
|
|
1 |
-
from agent_build_sdk.model.roles import ROLE_HUNTER
|
2 |
-
from agent_build_sdk.model.werewolf_model import AgentResp, AgentReq, STATUS_START, STATUS_WOLF_SPEECH, \
|
3 |
-
STATUS_VOTE_RESULT, STATUS_SKILL, STATUS_SKILL_RESULT, STATUS_NIGHT_INFO, STATUS_DAY, STATUS_DISCUSS, STATUS_VOTE, \
|
4 |
-
STATUS_RESULT, STATUS_NIGHT
|
5 |
-
from agent_build_sdk.utils.logger import logger
|
6 |
-
from agent_build_sdk.sdk.role_agent import BasicRoleAgent
|
7 |
-
from agent_build_sdk.sdk.agent import format_prompt
|
8 |
-
from hunter.prompt import DESC_PROMPT, VOTE_PROMPT, SKILL_PROMPT
|
9 |
-
|
10 |
-
|
11 |
-
class HunterAgent(BasicRoleAgent):
|
12 |
-
"""猎人角色Agent"""
|
13 |
-
|
14 |
-
def __init__(self, llm_caller=None, memory=None):
|
15 |
-
super().__init__(ROLE_HUNTER)
|
16 |
-
|
17 |
-
def perceive(self, req=AgentReq):
|
18 |
-
if req.status == STATUS_START:
|
19 |
-
self.memory.clear()
|
20 |
-
self.memory.set_variable("name", req.name)
|
21 |
-
self.memory.append_history("主持人:大家好,我们正在玩狼人杀游戏,6人局,包括预言家、女巫、猎人、平民和狼人")
|
22 |
-
self.memory.append_history("主持人:你好,你分配到的角色是[猎人]")
|
23 |
-
if req.status == STATUS_NIGHT:
|
24 |
-
self.memory.append_history("主持人:现在进入夜晚,天黑请闭眼")
|
25 |
-
if req.status == STATUS_NIGHT_INFO:
|
26 |
-
self.memory.append_history(f"主持人:天亮了!昨天晚上的信息是: {req.message}")
|
27 |
-
elif req.status == STATUS_DISCUSS: # 发言环节
|
28 |
-
if req.name:
|
29 |
-
# 其他玩家发言
|
30 |
-
self.memory.append_history(req.name + ': ' + req.message)
|
31 |
-
else:
|
32 |
-
# 主持人发言
|
33 |
-
self.memory.append_history('主持人: 现在进入第{}天。'.format(str(req.round)))
|
34 |
-
self.memory.append_history('主持人: 每个玩家描述自己的信息。')
|
35 |
-
elif req.status == STATUS_VOTE: # 投票环节
|
36 |
-
self.memory.append_history(req.name + ': ' + req.message)
|
37 |
-
elif req.status == STATUS_VOTE_RESULT: # 投票结果
|
38 |
-
out_player = req.name if req.name else req.message
|
39 |
-
if out_player:
|
40 |
-
self.memory.append_history('主持人: 投票结果是:{}。'.format(out_player))
|
41 |
-
# 如果猎人被投票出局,触发技能
|
42 |
-
if out_player == self.memory.load_variable("name"):
|
43 |
-
self.memory.append_history('主持人: 猎人被投票出局,可以发动技能带走一名玩家。')
|
44 |
-
else:
|
45 |
-
self.memory.append_history('主持人: 无人出局。')
|
46 |
-
elif req.status == STATUS_SKILL_RESULT: # 猎人技能
|
47 |
-
self.memory.append_history(f'主持人: 猎人,你带走了{req.message}')
|
48 |
-
elif req.status == STATUS_RESULT:
|
49 |
-
self.memory.append_history(req.message)
|
50 |
-
else:
|
51 |
-
raise NotImplementedError
|
52 |
-
|
53 |
-
def interact(self, req=AgentReq) -> AgentResp:
|
54 |
-
logger.info("hunter interact: {}".format(req))
|
55 |
-
if req.status == STATUS_DISCUSS:
|
56 |
-
prompt = format_prompt(DESC_PROMPT,
|
57 |
-
{"name": self.memory.load_variable("name"),
|
58 |
-
"history": "\n".join(self.memory.load_history())
|
59 |
-
})
|
60 |
-
logger.info("prompt:" + prompt)
|
61 |
-
result = self.llm_caller(prompt)
|
62 |
-
logger.info("hunter interact result: {}".format(result))
|
63 |
-
return AgentResp(success=True, result=result, errMsg=None)
|
64 |
-
|
65 |
-
elif req.status == STATUS_VOTE:
|
66 |
-
self.memory.append_history('主持人: 到了投票的时候了。每个人,请指向你认为可能是狼人的人。')
|
67 |
-
choices = [name for name in req.message.split(",") if name != self.memory.load_variable("name")] # 排除自己
|
68 |
-
self.memory.set_variable("choices", choices)
|
69 |
-
prompt = format_prompt(VOTE_PROMPT, {"name": self.memory.load_variable("name"),
|
70 |
-
"choices": choices,
|
71 |
-
"history": "\n".join(self.memory.load_history())
|
72 |
-
})
|
73 |
-
logger.info("prompt:" + prompt)
|
74 |
-
result = self.llm_caller(prompt)
|
75 |
-
logger.info("hunter interact result: {}".format(result))
|
76 |
-
return AgentResp(success=True, result=result, errMsg=None)
|
77 |
-
|
78 |
-
elif req.status == STATUS_SKILL:
|
79 |
-
self.memory.append_history('主持人: 猎人,请选择你要带走的玩家。')
|
80 |
-
choices = [name for name in req.message.split(",") if name != self.memory.load_variable("name")] # 排除自己
|
81 |
-
self.memory.set_variable("choices", choices)
|
82 |
-
prompt = format_prompt(SKILL_PROMPT, {"name": self.memory.load_variable("name"),
|
83 |
-
"choices": choices,
|
84 |
-
"history": "\n".join(self.memory.load_history())
|
85 |
-
})
|
86 |
-
logger.info("prompt:" + prompt)
|
87 |
-
result = self.llm_caller(prompt)
|
88 |
-
logger.info("hunter skill result: {}".format(result))
|
89 |
-
return AgentResp(success=True, result=result, skill_target_player=result, errMsg=None)
|
90 |
-
else:
|
91 |
-
raise NotImplementedError
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
werewolf/hunter/prompt.py
DELETED
@@ -1,37 +0,0 @@
|
|
1 |
-
DESC_PROMPT = """{history}
|
2 |
-
你是{name},你是一名猎人。你的目标是找出狼人,保护村庄。你拥有特殊技能:当你被投票出局或被狼人杀死时,可以开枪带走一名玩家。
|
3 |
-
请根据游戏规则和此前的对话,提供一个自然且合理的描述,确保:
|
4 |
-
|
5 |
-
你的描述要真实可信,表现出对村庄的关心和对狼人的警惕。
|
6 |
-
你的发言应当像一个猎人,使用日常的语言表达方式,但可以暗示你有能力在死亡时带走一个人。
|
7 |
-
你可以描述你观察到的可疑行为,或分享你对其他玩家的看法。
|
8 |
-
要谨慎发言,避免过早暴露自己的身份,但也可以适当威慑狼人。
|
9 |
-
以下是几个合适的示例:
|
10 |
-
"我昨晚听到东边有些动静,我已经做好了准备。"
|
11 |
-
"我觉得4号玩家的行为有点反常,如果我被淘汰,我会记住这一点。"
|
12 |
-
"我一直在观察每个人,如果我被杀,我会带走我认为最可疑的人。"
|
13 |
-
请按照类似的风格,结合当前游戏局势进行发言:
|
14 |
-
"""
|
15 |
-
|
16 |
-
VOTE_PROMPT = """{history}
|
17 |
-
你是{name},作为一名猎人,你的使命是找出潜伏的狼人。
|
18 |
-
请仔细分析当前游戏局势,选择你认为最可能是狼人的玩家进行投票:
|
19 |
-
|
20 |
-
注意观察每个玩家的发言,寻找逻辑矛盾或可疑之处。
|
21 |
-
关注玩家之间的互动,是否有人在刻意包庇或陷害他人。
|
22 |
-
分析投票倾向,是否有玩家在关键时刻改变立场。
|
23 |
-
留意反常行为,如过分激动或过于沉默的玩家。
|
24 |
-
从以下玩家中选择你认为最可能是狼人的人:{choices}
|
25 |
-
请直接返回你要投票的玩家名字:
|
26 |
-
"""
|
27 |
-
|
28 |
-
SKILL_PROMPT = """{history}
|
29 |
-
你是{name},作为猎人,你被淘汰了,现在可以使用你的技能带走一名玩家。
|
30 |
-
请仔细分析当前游戏局势,选择你认为最可能是狼人的玩家:
|
31 |
-
|
32 |
-
回顾所有玩家的发言和行为,找出最可疑的人。
|
33 |
-
考虑谁最有可能是狼人,带走他对村民阵营最有利。
|
34 |
-
如果你不确定谁是狼人,可以考虑带走最有影响力的玩家。
|
35 |
-
从以下玩家中选择你要带走的人:{choices}
|
36 |
-
请直接返回你要带走的玩家名字:
|
37 |
-
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
werewolf/seer/__pycache__/seer_agent.cpython-312.pyc
CHANGED
Binary files a/werewolf/seer/__pycache__/seer_agent.cpython-312.pyc and b/werewolf/seer/__pycache__/seer_agent.cpython-312.pyc differ
|
|
werewolf/seer/seer_agent.py
CHANGED
@@ -22,15 +22,15 @@ class SeerAgent(BasicRoleAgent):
|
|
22 |
self.memory.set_variable("checked_players", {}) # 重置已查验的玩家信息
|
23 |
self.memory.append_history("主持人:大家好,我们正在玩狼人杀游戏,6人局,包括预言家、女巫、猎人、平民和狼人")
|
24 |
self.memory.append_history("主持人:你好,你分配到的角色是[预言家]")
|
25 |
-
|
26 |
self.memory.append_history("主持人:现在进入夜晚,天黑请闭眼")
|
27 |
-
|
28 |
# 记录查验结果
|
29 |
self.memory.append_history(f"主持人:{req.name}的身份是{req.message}")
|
30 |
checked_players = self.memory.load_variable("checked_players")
|
31 |
checked_players[req.name] = req.message
|
32 |
self.memory.set_variable("checked_players", checked_players)
|
33 |
-
|
34 |
self.memory.append_history(f"主持人:天亮了!昨天晚上的信息是: {req.message}")
|
35 |
elif req.status == STATUS_DISCUSS: # 发言环节
|
36 |
if req.name:
|
|
|
22 |
self.memory.set_variable("checked_players", {}) # 重置已查验的玩家信息
|
23 |
self.memory.append_history("主持人:大家好,我们正在玩狼人杀游戏,6人局,包括预言家、女巫、猎人、平民和狼人")
|
24 |
self.memory.append_history("主持人:你好,你分配到的角色是[预言家]")
|
25 |
+
elif req.status == STATUS_NIGHT:
|
26 |
self.memory.append_history("主持人:现在进入夜晚,天黑请闭眼")
|
27 |
+
elif req.status == STATUS_SKILL_RESULT:
|
28 |
# 记录查验结果
|
29 |
self.memory.append_history(f"主持人:{req.name}的身份是{req.message}")
|
30 |
checked_players = self.memory.load_variable("checked_players")
|
31 |
checked_players[req.name] = req.message
|
32 |
self.memory.set_variable("checked_players", checked_players)
|
33 |
+
elif req.status == STATUS_NIGHT_INFO:
|
34 |
self.memory.append_history(f"主持人:天亮了!昨天晚上的信息是: {req.message}")
|
35 |
elif req.status == STATUS_DISCUSS: # 发言环节
|
36 |
if req.name:
|
werewolf/villager/__pycache__/villager_agent.cpython-312.pyc
CHANGED
Binary files a/werewolf/villager/__pycache__/villager_agent.cpython-312.pyc and b/werewolf/villager/__pycache__/villager_agent.cpython-312.pyc differ
|
|
werewolf/villager/villager_agent.py
CHANGED
@@ -20,9 +20,9 @@ class VillagerAgent(BasicRoleAgent):
|
|
20 |
self.memory.set_variable("name", req.name)
|
21 |
self.memory.append_history("主持人:大家好,我们正在玩狼人杀游戏,6人局,包括预言家、女巫、猎人、平民和狼人")
|
22 |
self.memory.append_history("主持人:你好,你分配到的角色是[平民]")
|
23 |
-
|
24 |
self.memory.append_history("主持人:现在进入夜晚,天黑请闭眼")
|
25 |
-
|
26 |
self.memory.append_history(f"主持人:天亮了!昨天晚上的信息是: {req.message}")
|
27 |
elif req.status == STATUS_DISCUSS: # 发言环节
|
28 |
if req.name:
|
|
|
20 |
self.memory.set_variable("name", req.name)
|
21 |
self.memory.append_history("主持人:大家好,我们正在玩狼人杀游戏,6人局,包括预言家、女巫、猎人、平民和狼人")
|
22 |
self.memory.append_history("主持人:你好,你分配到的角色是[平民]")
|
23 |
+
elif req.status == STATUS_NIGHT:
|
24 |
self.memory.append_history("主持人:现在进入夜晚,天黑请闭眼")
|
25 |
+
elif req.status == STATUS_NIGHT_INFO:
|
26 |
self.memory.append_history(f"主持人:天亮了!昨天晚上的信息是: {req.message}")
|
27 |
elif req.status == STATUS_DISCUSS: # 发言环节
|
28 |
if req.name:
|
werewolf/witch/__pycache__/witch_agent.cpython-312.pyc
CHANGED
Binary files a/werewolf/witch/__pycache__/witch_agent.cpython-312.pyc and b/werewolf/witch/__pycache__/witch_agent.cpython-312.pyc differ
|
|
werewolf/witch/witch_agent.py
CHANGED
@@ -26,11 +26,11 @@ class WitchAgent(BasicRoleAgent):
|
|
26 |
self.memory.set_variable("has_antidote", True)
|
27 |
self.memory.append_history("主持人:大家好,我们正在玩狼人杀游戏,6人局,包括预言家、女巫、猎人、平民和狼人")
|
28 |
self.memory.append_history("主持人:你好,你分配到的角色是[女巫]")
|
29 |
-
|
30 |
self.memory.append_history("主持人:现在进入夜晚,天黑请闭眼")
|
31 |
-
|
32 |
self.memory.append_history(f"主持人:女巫,你使用技能的结果是{req.message}")
|
33 |
-
|
34 |
self.memory.append_history(f"主持人:天亮了!昨天晚上的信息是: {req.message}")
|
35 |
elif req.status == STATUS_DISCUSS: # 发言环节
|
36 |
if req.name:
|
|
|
26 |
self.memory.set_variable("has_antidote", True)
|
27 |
self.memory.append_history("主持人:大家好,我们正在玩狼人杀游戏,6人局,包括预言家、女巫、猎人、平民和狼人")
|
28 |
self.memory.append_history("主持人:你好,你分配到的角色是[女巫]")
|
29 |
+
elif req.status == STATUS_NIGHT:
|
30 |
self.memory.append_history("主持人:现在进入夜晚,天黑请闭眼")
|
31 |
+
elif req.status == STATUS_SKILL_RESULT:
|
32 |
self.memory.append_history(f"主持人:女巫,你使用技能的结果是{req.message}")
|
33 |
+
elif req.status == STATUS_NIGHT_INFO:
|
34 |
self.memory.append_history(f"主持人:天亮了!昨天晚上的信息是: {req.message}")
|
35 |
elif req.status == STATUS_DISCUSS: # 发言环节
|
36 |
if req.name:
|
werewolf/wolf/__pycache__/wolf_agent.cpython-312.pyc
CHANGED
Binary files a/werewolf/wolf/__pycache__/wolf_agent.cpython-312.pyc and b/werewolf/wolf/__pycache__/wolf_agent.cpython-312.pyc differ
|
|
werewolf/wolf/wolf_agent.py
CHANGED
@@ -26,17 +26,17 @@ class WolfAgent(BasicRoleAgent):
|
|
26 |
teammates = req.message.split(",")
|
27 |
self.memory.set_variable("teammates", teammates)
|
28 |
self.memory.append_history(f"主持人:你的狼人队友是: {req.message}")
|
29 |
-
|
30 |
self.memory.append_history("主持人:现在进入夜晚,天黑请闭眼")
|
31 |
-
|
32 |
# 狼人之间的交流
|
33 |
if req.name:
|
34 |
self.memory.append_history(f"狼人{req.name}说: {req.message}")
|
35 |
else:
|
36 |
self.memory.append_history("主持人:狼人请睁眼,狼人请互相确认身份,并选择要击杀的对象")
|
37 |
-
|
38 |
self.memory.append_history(f"主持人:狼人请今晚选择击杀的目标是:{req.name}")
|
39 |
-
|
40 |
self.memory.append_history(f"主持人:天亮了!昨天晚上的信息是: {req.message}")
|
41 |
elif req.status == STATUS_DISCUSS: # 发言环节
|
42 |
if req.name:
|
|
|
26 |
teammates = req.message.split(",")
|
27 |
self.memory.set_variable("teammates", teammates)
|
28 |
self.memory.append_history(f"主持人:你的狼人队友是: {req.message}")
|
29 |
+
elif req.status == STATUS_NIGHT:
|
30 |
self.memory.append_history("主持人:现在进入夜晚,天黑请闭眼")
|
31 |
+
elif req.status == STATUS_WOLF_SPEECH:
|
32 |
# 狼人之间的交流
|
33 |
if req.name:
|
34 |
self.memory.append_history(f"狼人{req.name}说: {req.message}")
|
35 |
else:
|
36 |
self.memory.append_history("主持人:狼人请睁眼,狼人请互相确认身份,并选择要击杀的对象")
|
37 |
+
elif req.status == STATUS_SKILL_RESULT:
|
38 |
self.memory.append_history(f"主持人:狼人请今晚选择击杀的目标是:{req.name}")
|
39 |
+
elif req.status == STATUS_NIGHT_INFO:
|
40 |
self.memory.append_history(f"主持人:天亮了!昨天晚上的信息是: {req.message}")
|
41 |
elif req.status == STATUS_DISCUSS: # 发言环节
|
42 |
if req.name:
|