Files
pixelheros/assets/script/game/common/config/AttrSet.ts
walkpan 3ad446048a feat(配置): 添加药水卡片配置及获取逻辑
新增药水卡片的基础配置 CanSelectPotions 和 PotionCards
在卡片信息获取和默认卡池逻辑中添加药水类型的处理
2026-01-16 20:10:52 +08:00

66 lines
4.6 KiB
TypeScript

import { Attrs } from "./HeroAttrs";
export interface AttrInfo {
uuid: number;
icon:string; // 属性图标
attr: Attrs; // 属性类型
value: number;// 属性值
showValue: number;// 显示值
desc: string;// 属性描述
isSpecial: boolean;// 是否为特殊属性
note?: string;// 属性备注
}
export const AttrCards: Record<number, AttrInfo> = {
2001:{uuid:2001, icon:"1020", attr: Attrs.AP, value: 16.5, showValue: 16.5, desc: "攻击力 +16.5", isSpecial: false, note: "常规强化" },
2002:{uuid:2002, icon:"1020", attr: Attrs.HP_MAX, value: 110, showValue: 110, desc: "生命上限 +110", isSpecial: false, note: "常规强化" },
2003:{uuid:2003, icon:"1020", attr: Attrs.DEF, value: 5.5, showValue: 5.5, desc: "防御力 +5.5", isSpecial: false, note: "常规强化" },
2004:{uuid:2004, icon:"1020", attr: Attrs.AS, value: 5.25, showValue: 5.25, desc: "攻击速度 +5.25%", isSpecial: false, note: "常规强化" },
2005:{uuid:2005, icon:"1020", attr: Attrs.PUNCTURE, value: 1, showValue: 1, desc: "穿透数量 +1", isSpecial: true, note: "上限5层" },
2006:{uuid:2006, icon:"1020", attr: Attrs.CRITICAL, value: 14, showValue: 14, desc: "暴击率 +14%", isSpecial: true, note: "上限70%" },
2007:{uuid:2007, icon:"1020", attr: Attrs.CRITICAL_DMG, value: 40, showValue: 40, desc: "暴击伤害 +40%", isSpecial: true, note: "上限200%" },
2008:{uuid:2008, icon:"1020", attr: Attrs.STUN_CHANCE, value: 10, showValue: 10, desc: "眩晕概率 +10%", isSpecial: true, note: "上限50%" },
2009:{uuid:2009, icon:"1020", attr: Attrs.FREEZE_CHANCE, value: 10, showValue: 10, desc: "冰冻概率 +10%", isSpecial: true, note: "上限50%" },
2010:{uuid:2010, icon:"1020", attr: Attrs.BURN_CHANCE, value: 10, showValue: 10, desc: "燃烧概率 +10%", isSpecial: true, note: "上限50%" },
2011:{uuid:2011, icon:"1020", attr: Attrs.BACK_CHANCE, value: 10, showValue: 10, desc: "击退概率 +10%", isSpecial: true, note: "上限50%" },
2012:{uuid:2012, icon:"1020", attr: Attrs.SLOW_CHANCE, value: 10, showValue: 10, desc: "减速概率 +10%", isSpecial: true, note: "上限50%" },
2013:{uuid:2013, icon:"1020", attr: Attrs.LIFESTEAL, value: 10, showValue: 10, desc: "吸血比例 +10%", isSpecial: true, note: "上限50%" },
2014:{uuid:2014, icon:"1020", attr: Attrs.MANASTEAL, value: 10, showValue: 10, desc: "吸蓝比例 +10%", isSpecial: true, note: "上限50%" },
}
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],
// 混合
4: [2001, 2002, 2003, 2004],
// 进阶属性
7: [2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2013],
// 默认全开
99: [2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014]
};
export const CanSelectPotions: Record<number, number[]> = {
// 普通药水
1: [3005, 3006, 3007, 3008],
// 强力药水
10: [3001, 3002, 3003, 3004],
// 默认全开
99: [3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008]
};