物品预备

This commit is contained in:
Giao committed 2026-10-06 21:55:32 +08:00
1 parent 43c1859aad
commit a0ff1f80d1
297 files changed
+4000 -9

No files matched your search

@@ -124,3 +124,34 @@ CUT_COUNT = 2
# 手握堆叠/寿司堆 每次消耗手持数
STACK_CONSUME = 1
# ============================================================================
# 手持物品右键"寿司方块本体"的转换对(block + item)
# 寿司的规则都内联在 ShousiService 里, 不像其它分类写在 *Data 的 SWITCH_RULES,
# 客户端拦截白名单无法自动派生 -> 手持饭团/鱼右键寿司方块时会被当成"吃/放置"
# (饭团被吃、鱼被放成死鱼), 转换不触发。
# 这里按 SUSHI_GROUPS 反向导出一份 (block, item) 表, 供 InterceptData 汇入
# BLOCKUSE_CANCEL, 使客户端命中后显式发 BlockUseRequest, 由服务端
# ShousiService.handleBlockUse 执行转换。
# ============================================================================
def _build_shousi_switches():
pairs = [{"block": NORI_0, "item": RICE_BALL}] # 基础组: 干海带 + 饭团
for g in SUSHI_GROUPS:
fish = g.get("fish")
roll = g.get("roll")
# 手握: 手握普通寿司 + 鱼
pairs.append({"block": NIGIRI_BASE, "item": fish})
# 手握堆叠: 手持 手握X(一个) 右键 手握X(一/两个)
pairs.append({"block": g["nigiri1"], "item": g["nigiri1"]})
pairs.append({"block": g["nigiri2"], "item": g["nigiri1"]})
if roll:
# 加鱼: 干海带(加饭团) + 鱼
pairs.append({"block": NORI_1, "item": fish})
# 寿司堆: 手持 卷寿司(链尾) 右键 卷寿司/寿司堆(两个)
pairs.append({"block": roll[-1], "item": roll[-1]})
if g.get("pile2"):
pairs.append({"block": g["pile2"], "item": roll[-1]})
return pairs
SHOUSI_SWITCHES = _build_shousi_switches()