继续完善 装备buff

This commit is contained in:
2025-06-12 16:24:23 +08:00
parent 4c0d1023a0
commit cb38aa55a4
12 changed files with 227 additions and 190 deletions

View File

@@ -1,4 +1,5 @@
import { app } from "electron";
import { BuffAttr } from "./SkillSet";
// 装备类型
export enum EquipType {
@@ -7,18 +8,6 @@ export enum EquipType {
ACCESSORY = 3 // 饰品
}
// 基础属性加成
export enum EquipAttr {
ATK = 1, // 攻击力
ATK_COUNT = 2, // 攻击个数
ATK_CD = 3, // 攻击速度
HP = 4, // 生命值
DEF = 5, // 免伤
SKILL_DMG = 6, // 技能效果
SKILL_CD = 7, // 技能冷却缩减
CARD_EFFECT = 8, // 卡牌效果
CARD_COUNT = 8, // 卡牌起效次数,每3次多起效一次
}
//装备属性起效对象
export enum EquipAttrTarget {
ALL = 0, // 所有
@@ -52,7 +41,7 @@ export const accessory_id=[2201,2202,2203,2204,2205,2206,2207,2208,2209,2210,221
export const equip_list=[2001,2002,2003,2004,2005]
// 装备属性加成接口
export interface EquipAttribute {
type: EquipAttr; // 属性类型
type: BuffAttr; // 属性类型
value: number; // 属性值
target?: EquipAttrTarget; // 属性作用目标(可选)
}
@@ -68,36 +57,36 @@ export interface EquipData {
export const EquipInfo: { [key: number]: EquipData } = {
2001: {uuid: 2001, name: "新手剑", type: EquipType.WEAPON,info:"攻击力增加80%",
attributes: [
{ type: EquipAttr.ATK, value: 80, target: EquipAttrTarget.HERO },
{ type: EquipAttr.ATK_CD, value: 30, target: EquipAttrTarget.HERO },
{ type: EquipAttr.ATK_COUNT, value: 1, target: EquipAttrTarget.HERO },
{ type: BuffAttr.ATK, value: 80, target: EquipAttrTarget.HERO },
{ type: BuffAttr.ATK_CD, value: 30, target: EquipAttrTarget.HERO },
{ type: BuffAttr.ATK_COUNT, value: 1, target: EquipAttrTarget.HERO },
]
},
2002: {uuid: 2002,name: "新手剑2",type: EquipType.WEAPON,info:"攻击速度增加30%",
attributes: [
{ type: EquipAttr.ATK_CD, value: 30, target: EquipAttrTarget.HERO },
{ type: EquipAttr.ATK_COUNT, value: 1, target: EquipAttrTarget.HERO },
{ type: BuffAttr.ATK_CD, value: 30, target: EquipAttrTarget.HERO },
{ type: BuffAttr.ATK_COUNT, value: 1, target: EquipAttrTarget.HERO },
]
},
2003: {uuid: 2003,name: "新手剑3",type: EquipType.WEAPON,info:"攻击次数增加1次",
attributes: [
{ type: EquipAttr.ATK_COUNT, value: 1, target: EquipAttrTarget.HERO },
{ type: EquipAttr.ATK_CD, value: 30, target: EquipAttrTarget.HERO },
{ type: EquipAttr.ATK_COUNT, value: 1, target: EquipAttrTarget.HERO },
{ type: BuffAttr.ATK_COUNT, value: 1, target: EquipAttrTarget.HERO },
{ type: BuffAttr.ATK_CD, value: 30, target: EquipAttrTarget.HERO },
{ type: BuffAttr.ATK_COUNT, value: 1, target: EquipAttrTarget.HERO },
]
},
2004: {uuid: 2004,name: "防具1",type: EquipType.ARMOR,info:"生命值增加100%",
attributes: [
{ type: EquipAttr.HP, value: 100, target: EquipAttrTarget.HERO },
{ type: EquipAttr.ATK_CD, value: 30, target: EquipAttrTarget.HERO },
{ type: EquipAttr.ATK_COUNT, value: 1, target: EquipAttrTarget.HERO },
{ type: BuffAttr.HP, value: 100, target: EquipAttrTarget.HERO },
{ type: BuffAttr.ATK_CD, value: 30, target: EquipAttrTarget.HERO },
{ type: BuffAttr.ATK_COUNT, value: 1, target: EquipAttrTarget.HERO },
]
},
2005: {uuid: 2005,name: "防具2",type: EquipType.ARMOR,info:"免伤增加50%",
attributes: [
{ type: EquipAttr.DEF, value: 50, target: EquipAttrTarget.HERO },
{ type: EquipAttr.ATK_CD, value: 30, target: EquipAttrTarget.HERO },
{ type: EquipAttr.ATK_COUNT, value: 1, target: EquipAttrTarget.HERO },
{ type: BuffAttr.DEF, value: 50, target: EquipAttrTarget.HERO },
{ type: BuffAttr.ATK_CD, value: 30, target: EquipAttrTarget.HERO },
{ type: BuffAttr.ATK_COUNT, value: 1, target: EquipAttrTarget.HERO },
]
},