Skip to content

feat(werewolf): add sheriff election, badge transfer, action popups and TTS toggle#869

Open
feelshana wants to merge 2 commits into
agentscope-ai:mainfrom
feelshana:develop-wolf-hit
Open

feat(werewolf): add sheriff election, badge transfer, action popups and TTS toggle#869
feelshana wants to merge 2 commits into
agentscope-ai:mainfrom
feelshana:develop-wolf-hit

Conversation

@feelshana
Copy link
Copy Markdown
Contributor

@feelshana feelshana commented Mar 5, 2026

AgentScope-Java Version

main

Description

Enhance the Werewolf HITL web game with sheriff election mechanics,
badge transfer on elimination, role action popups, a TTS audio toggle,
and improved prompts for better AI reasoning (recommended model: deepseek-v3).

Checklist

Changes

Sheriff Election & Voting

  • Add sheriff registration phase at the first day
  • Add campaign speech phase for sheriff candidates (AI + human)
  • Add sheriff voting phase for non-candidate players
  • Add speaking order decision by elected sheriff (clockwise/counterclockwise)
  • Emit SHERIFF_REGISTRATION / SHERIFF_CANDIDATES_ANNOUNCED / SHERIFF_CAMPAIGN /
    SHERIFF_VOTE / SHERIFF_ELECTED events to frontend

Sheriff Badge Transfer

  • Add badge transfer phase when sheriff is eliminated
  • Seer sheriff can pass verified player info through badge transfer
  • Emit SHERIFF_TRANSFER event with transfer target and check info
  • Frontend displays badge icon on sheriff player card

Role Action Popups

  • Add night action popup for werewolf kill result
  • Add night action popup for witch heal / witch poison
  • Add night action popup for seer check result
  • Add sheriff elected popup with vote details

TTS Audio Toggle

  • Add enable/disable audio slider switch in page header (default: on)
  • Immediately stop all active playback and clear queue when toggled off
  • Check mute state on each audio chunk received and each playback loop tick
  • Add campaign speech TTS for AI sheriff candidates

Prompt Improvements

  • Refine role prompt, info_source, werewolf discussion and day discussion prompts
    for more accurate and context-aware AI responses
  • Recommended model: deepseek-v3 yields significantly better game performance

@feelshana feelshana requested a review from a team March 5, 2026 02:30
@gemini-code-assist
Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Msg responseMsg =
Msg.builder()
.name(getName())
.name(param.getAgent().getName())
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agent 名称代替generate_response,会不会影响其他地方哦

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里是项目自带的格式化工具,处理格式化返回,现在用的是格式化工具名,而不是agent名,应该是个Bug,会导致多agent的情况下,不知道是谁的消息

@feelshana feelshana closed this Mar 5, 2026
@feelshana feelshana reopened this Mar 5, 2026
@feelshana feelshana closed this Mar 5, 2026
@feelshana feelshana reopened this Mar 5, 2026
@feelshana feelshana force-pushed the develop-wolf-hit branch 2 times, most recently from 1ba12ee to f1846a0 Compare March 6, 2026 03:55
@feelshana feelshana closed this Mar 6, 2026
@feelshana feelshana reopened this Mar 6, 2026
@feelshana feelshana closed this Mar 6, 2026
@feelshana feelshana reopened this Mar 6, 2026
@feelshana feelshana requested a review from ChPi March 16, 2026 06:15
@AgentScopeJavaBot AgentScopeJavaBot added enhancement New feature or request area/core/agent Agent runtime, pipeline, hooks, plan area/examples agentscope-examples labels May 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/core/agent Agent runtime, pipeline, hooks, plan area/examples agentscope-examples enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants