Skip to main content

牛牛决斗

牛牛决斗 pallas-plugin-duel

提供多幕决斗、八角笼与 QTE 抢答玩法。

官方插件 控制台插件商店 安装命令 PyPI 版本

安装方式

需已安装 Pallas-Bot ≥ 4.0。

推荐直接在控制台插件商店安装,或在本体项目中执行:

uv run pallas ext install pallas-plugin-duel

也可单独安装本包:

uv pip install pallas-plugin-duel

开发联调:clone 本仓库后 uv pip install -e .(pyproject.toml 可配置本体 path 依赖)。

多进程分片

Pallas-Bot 支持单进程,也支持 hub + 多个 worker 的多进程部署。启用分片时:

  • hub 与每个 worker 须安装相同版本的本扩展包;
  • 各进程共享同一路径的 data/(注册表、协调状态、WebUI 落盘等);
  • 跨进程互斥与状态同步依赖 Redis 协调层(配置见文档站)。

本插件通过本体 plugin_coord 与启动时的 register_duel_coord() / register_fleet_probe() 接入协调层;未安装扩展时不影响 core 插件运行。

详见:多进程分片 · 架构说明

怎么使用

泰拉风味多幕决斗:事件包、干员/关键词 QTE、双牛八角笼、胜负惩罚。

用户命令

口令 / 触发 场景 说明
牛牛决斗 @对手 [N幕|N回合] 群内 对人或单牛
牛牛决斗 @牛A @牛B 群内 双牛对决
八角笼牛 [N幕|N回合] 群内 随机两只在线牛牛
按幕面提示答干员名 / 关键词 群内 QTE 抢答
决斗事件重载 群内 热更新事件包(群管)

命令权限

命令 ID 默认等级
duel.duel 所有人
duel.cage 所有人
duel.reload_events 群管/群主

详细用法、限制条件和可用范围以帮助为主。

配置项

WebUI 插件 → duel,或本仓库 config.py。事件包约定见 event_packs/README.md。

干员资源同步(在本体仓库执行):

uv run python scripts/fetch_arknights_duel_data.py

排障

现象 处理
无法开战 同群仅一场;检查 @ 与在线牛
乱入无头像 执行资源脚本补 resource/arknights/avatars

实现

源码位置:src/pallas_plugin_duel/

实现要点:

  • 决斗事件、QTE 与多牛牛在线判定共同组成一场完整对局。
  • 分片模式下通过协调层维持同群互斥与事件同步。
  • 干员资源与头像不全时会直接影响决斗展示效果。

相关链接

说明 链接
牛牛决斗 · 用户文档 文档站 · duel
插件开发入门 develop/plugin/getting-started
多进程分片 architecture/bot-process-sharding

Metadata

Release files for pallas-plugin-duel 4.0.26

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pallas-plugin-duel 4.0.26
File Size Uploaded
pallas_plugin_duel-4.0.26.tar.gz 3.2 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for pallas-plugin-duel 4.0.26
File Interpreter ABI Platform
pallas_plugin_duel-4.0.26-py3-none-any.whl Python 3 none any Details

Total release size: 3.3 MB

Release files / pallas_plugin_duel-4.0.26.tar.gz

Download URL pallas_plugin_duel-4.0.26.tar.gz
Size 3.2 MB
Tags Source
SHA-256 checksum
How to use checksums
1399d68cf97b5c72b3a65633a4228bb2761c8e22af20d2efcc50dd77090af216
BLAKE2b-256 checksum
How to use checksums
856f416d3e347e0dc04a78fe398eb0b1aa1a8ffaf3bb93daaad76438654e3729
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 30, 2026.

Transparency log

Release files / pallas_plugin_duel-4.0.26-py3-none-any.whl

Download URL pallas_plugin_duel-4.0.26-py3-none-any.whl
Size 97.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
54332a5fdadd47d8710b671c5f4d002942ed0a9a10745092c4a1006c280ef8e4
BLAKE2b-256 checksum
How to use checksums
d461ee35ea5310dc1bff80f45aa2fe729468e38939738ac08e4c152341f2e1ca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 30, 2026.

Transparency log

Release history Release notifications | RSS feed

4.0.27

2 release files

This release

4.0.26 This release

2 release files

4.0.25

2 release files

4.0.24

2 release files

4.0.23

2 release files

4.0.22

2 release files

4.0.21

2 release files

4.0.17

2 release files

4.0.16

2 release files

4.0.15

2 release files

4.0.14

2 release files

4.0.13

2 release files

4.0.11

2 release files

4.0.10

2 release files

4.0.9

2 release files

4.0.8

2 release files

4.0.7

2 release files

4.0.6

2 release files

4.0.5

2 release files

4.0.4

2 release files

4.0.3

2 release files

4.0.2

2 release files

4.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page