feat(物品系统): 重构药水系统并移除旧物品配置

将药水物品从ItemSet迁移到AttrSet作为PotionCards,并实现新的药水使用逻辑
移除已废弃的ItemSet.ts文件
This commit is contained in:
walkpan
2026-01-16 19:47:45 +08:00
parent ab4b7d356c
commit f8acaae2a0
3 changed files with 37 additions and 137 deletions

View File

@@ -27,7 +27,25 @@ import { Attrs } from "./HeroAttrs";
2014:{uuid:2014, icon:"1020", attr: Attrs.MANASTEAL, value: 10, showValue: 10, desc: "吸蓝比例 +10%", isSpecial: true, note: "上限50%" },
}
export const CanSelectAttrs: Record<number, number[]> = {
export interface PotionInfo extends AttrInfo {
duration: number; // 持续时间
}
export const PotionCards: Record<number, PotionInfo> = {
// 持续时间20秒的强力药水
3001: { uuid: 3001, icon: "1020", attr: Attrs.AP, value: 50, showValue: 50, desc: "20秒内攻击力 +50%", isSpecial: false, note: "狂暴药水", duration: 20 },
3002: { uuid: 3002, icon: "1020", attr: Attrs.AS, value: 50, showValue: 50, desc: "20秒内攻速 +50%", isSpecial: false, note: "急速药水", duration: 20 },
3003: { uuid: 3003, icon: "1020", attr: Attrs.DEF, value: 50, showValue: 50, desc: "20秒内防御 +50%", isSpecial: false, note: "金钟罩", duration: 20 },
3004: { uuid: 3004, icon: "1020", attr: Attrs.SPEED, value: 50, showValue: 50, desc: "20秒内移速 +50%", isSpecial: false, note: "神行药水", duration: 20 },
// 持续时间60秒的普通药水
3005: { uuid: 3005, icon: "1020", attr: Attrs.AP, value: 20, showValue: 20, desc: "60秒内攻击力 +20%", isSpecial: false, note: "力量药剂", duration: 60 },
3006: { uuid: 3006, icon: "1020", attr: Attrs.AS, value: 20, showValue: 20, desc: "60秒内攻速 +20%", isSpecial: false, note: "敏捷药剂", duration: 60 },
3007: { uuid: 3007, icon: "1020", attr: Attrs.DEF, value: 20, showValue: 20, desc: "60秒内防御 +20%", isSpecial: false, note: "护甲药剂", duration: 60 },
3008: { uuid: 3008, icon: "1020", attr: Attrs.SPEED, value: 20, showValue: 20, desc: "60秒内移速 +20%", isSpecial: false, note: "轻灵药剂", duration: 60 },
};
export const CanSelectAttrs: Record<number, number[]> = {
// 基础属性
2: [2001, 2002, 2003, 2004],
// 混合