Spaces:
Running
Running
茂道
commited on
Commit
·
d42d2e3
1
Parent(s):
c94cffe
update
Browse files- .idea/workspace.xml +3 -2
- werewolf/seer/seer_agent.py +1 -1
- werewolf/witch/witch_agent.py +2 -2
.idea/workspace.xml
CHANGED
@@ -3,7 +3,8 @@
|
|
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$/werewolf/
|
|
|
7 |
</list>
|
8 |
<option name="SHOW_DIALOG" value="false" />
|
9 |
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
@@ -71,7 +72,7 @@
|
|
71 |
<option name="number" value="Default" />
|
72 |
<option name="presentableId" value="Default" />
|
73 |
<updated>1745132074997</updated>
|
74 |
-
<workItem from="1745132078229" duration="
|
75 |
</task>
|
76 |
<servers />
|
77 |
</component>
|
|
|
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$/werewolf/seer/seer_agent.py" beforeDir="false" afterPath="$PROJECT_DIR$/werewolf/seer/seer_agent.py" afterDir="false" />
|
7 |
+
<change beforePath="$PROJECT_DIR$/werewolf/witch/witch_agent.py" beforeDir="false" afterPath="$PROJECT_DIR$/werewolf/witch/witch_agent.py" afterDir="false" />
|
8 |
</list>
|
9 |
<option name="SHOW_DIALOG" value="false" />
|
10 |
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
|
|
72 |
<option name="number" value="Default" />
|
73 |
<option name="presentableId" value="Default" />
|
74 |
<updated>1745132074997</updated>
|
75 |
+
<workItem from="1745132078229" duration="12049000" />
|
76 |
</task>
|
77 |
<servers />
|
78 |
</component>
|
werewolf/seer/seer_agent.py
CHANGED
@@ -26,7 +26,7 @@ class SeerAgent(BasicRoleAgent):
|
|
26 |
self.memory.append_history("主持人:现在进入夜晚,天黑请闭眼")
|
27 |
elif req.status == STATUS_SKILL_RESULT:
|
28 |
# 记录查验结果
|
29 |
-
self.memory.append_history(
|
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)
|
|
|
26 |
self.memory.append_history("主持人:现在进入夜晚,天黑请闭眼")
|
27 |
elif req.status == STATUS_SKILL_RESULT:
|
28 |
# 记录查验结果
|
29 |
+
self.memory.append_history(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)
|
werewolf/witch/witch_agent.py
CHANGED
@@ -58,7 +58,7 @@ class WitchAgent(BasicRoleAgent):
|
|
58 |
if req.status == STATUS_DISCUSS:
|
59 |
has_poison = self.memory.load_variable("has_poison")
|
60 |
has_antidote = self.memory.load_variable("has_antidote")
|
61 |
-
skill_info = "女巫有{}瓶毒药和{}瓶解药".format("
|
62 |
|
63 |
prompt = format_prompt(DESC_PROMPT,
|
64 |
{"name": self.memory.load_variable("name"),
|
@@ -91,7 +91,7 @@ class WitchAgent(BasicRoleAgent):
|
|
91 |
choices = [name for name in req.message.split(",") if name != self.memory.load_variable("name")] # 排除自己
|
92 |
self.memory.set_variable("choices", choices)
|
93 |
|
94 |
-
skill_info = "女巫有{}瓶毒药和{}瓶解药".format("
|
95 |
prompt = format_prompt(SKILL_PROMPT, {
|
96 |
"name": self.memory.load_variable("name"),
|
97 |
"choices": choices,
|
|
|
58 |
if req.status == STATUS_DISCUSS:
|
59 |
has_poison = self.memory.load_variable("has_poison")
|
60 |
has_antidote = self.memory.load_variable("has_antidote")
|
61 |
+
skill_info = "女巫有{}瓶毒药和{}瓶解药".format("1" if has_poison else "0", "1" if has_antidote else "0")
|
62 |
|
63 |
prompt = format_prompt(DESC_PROMPT,
|
64 |
{"name": self.memory.load_variable("name"),
|
|
|
91 |
choices = [name for name in req.message.split(",") if name != self.memory.load_variable("name")] # 排除自己
|
92 |
self.memory.set_variable("choices", choices)
|
93 |
|
94 |
+
skill_info = "女巫有{}瓶毒药和{}瓶解药".format("1" if has_poison else "0", "1" if has_antidote else "0")
|
95 |
prompt = format_prompt(SKILL_PROMPT, {
|
96 |
"name": self.memory.load_variable("name"),
|
97 |
"choices": choices,
|