From fc35e40688847780723ff70d77ac25912f8568b3 Mon Sep 17 00:00:00 2001 From: panw Date: Wed, 2 Apr 2025 16:58:59 +0800 Subject: [PATCH] dd --- assets/script/game/common/config/Equips.ts | 230 +++++++++++++++++++++ 1 file changed, 230 insertions(+) create mode 100644 assets/script/game/common/config/Equips.ts diff --git a/assets/script/game/common/config/Equips.ts b/assets/script/game/common/config/Equips.ts new file mode 100644 index 00000000..10f6a292 --- /dev/null +++ b/assets/script/game/common/config/Equips.ts @@ -0,0 +1,230 @@ +// 装备类型 +export enum EquipType { + WEAPON = 1, // 武器 + ARMOR = 2, // 防具 + ACCESSORY = 3 // 饰品 +} + +// 基础效果类型 +export enum EffectType { + ATK = 1, // 攻击力 + DEF = 2, // 防御力 + HP = 3, // 生命值 + ATK_SPEED = 4, // 攻击速度 + CRIT_RATE = 5, // 暴击率 + CRIT_DMG = 6, // 暴击伤害 + SKILL_DMG = 7, // 技能伤害提升 + SKILL_CD = 8, // 技能冷却缩减 + RANGE = 9 // 攻击范围 +} + +// 套装ID +export enum SuitType { + DRAGON = 1, // 龙之套装 + EAGLE = 2, // 鹰眼套装 + FROST = 3, // 寒冰套装 +} + +// 基础效果接口 +export interface Effect { + type: EffectType; + value: number; // 具体数值 + isPercent?: boolean;// 是否为百分比加成 +} + +// 技能效果接口 +export interface SkillEffect { + skillId: number; // 技能ID + effects: { + dmgBonus?: number; // 伤害提升 + cdReduce?: number; // 冷却缩减 + rangeBonus?: number; // 范围提升 + special?: string; // 特殊效果描述 + } +} + +// 套装效果接口 +export interface SuitEffect { + suitType: SuitType; + require: number; // 需要件数 + effects: Effect[]; + skillEffects?: SkillEffect[]; +} + +// 装备配置接口 +export interface EquipConfig { + id: number; + name: string; + type: EquipType; + quality: number; // 1-5星 + suitType: SuitType; + effects: Effect[]; + skillEffects?: SkillEffect[]; + description: string; +} + +// 套装效果配置 +export const SuitEffects: { [key in SuitType]: SuitEffect[] } = { + [SuitType.DRAGON]: [ + { + suitType: SuitType.DRAGON, + require: 2, + effects: [ + { type: EffectType.ATK, value: 15, isPercent: true } + ] + }, + { + suitType: SuitType.DRAGON, + require: 4, + effects: [ + { type: EffectType.ATK, value: 25, isPercent: true }, + { type: EffectType.SKILL_DMG, value: 20, isPercent: true } + ], + skillEffects: [ + { + skillId: 1001, // 龙息技能 + effects: { + dmgBonus: 30, + rangeBonus: 20, + special: "技能额外造成燃烧效果" + } + } + ] + } + ], + [SuitType.EAGLE]: [ + { + suitType: SuitType.EAGLE, + require: 2, + effects: [ + { type: EffectType.CRIT_RATE, value: 15, isPercent: true } + ] + }, + { + suitType: SuitType.EAGLE, + require: 4, + effects: [ + { type: EffectType.CRIT_RATE, value: 25, isPercent: true }, + { type: EffectType.CRIT_DMG, value: 50, isPercent: true } + ], + skillEffects: [ + { + skillId: 1002, // 精准射击 + effects: { + cdReduce: 30, + special: "必定暴击且无视目标50%防御" + } + } + ] + } + ], + [SuitType.FROST]: [ + { + suitType: SuitType.FROST, + require: 2, + effects: [ + { type: EffectType.ATK_SPEED, value: 10, isPercent: true } + ] + }, + { + suitType: SuitType.FROST, + require: 4, + effects: [ + { type: EffectType.ATK_SPEED, value: 20, isPercent: true }, + { type: EffectType.SKILL_CD, value: 15, isPercent: true } + ], + skillEffects: [ + { + skillId: 1003, // 冰霜新星 + effects: { + rangeBonus: 30, + special: "技能额外造成冰冻效果" + } + } + ] + } + ] +} + +// 装备配置数据 +export const Equips: { [key: number]: EquipConfig } = { + // 龙之套装 + 1001: { + id: 1001, + name: "龙王之刃", + type: EquipType.WEAPON, + quality: 5, + suitType: SuitType.DRAGON, + effects: [ + { type: EffectType.ATK, value: 100 }, + { type: EffectType.SKILL_DMG, value: 15, isPercent: true } + ], + skillEffects: [ + { + skillId: 1001, + effects: { + dmgBonus: 20 + } + } + ], + description: "传说中由远古巨龙鳞片打造的神器" + }, + 1002: { + id: 1002, + name: "龙鳞胸甲", + type: EquipType.ARMOR, + quality: 5, + suitType: SuitType.DRAGON, + effects: [ + { type: EffectType.HP, value: 500 }, + { type: EffectType.DEF, value: 50 } + ], + description: "蕴含龙之力量的铠甲" + }, + + // 鹰眼套装 + 2001: { + id: 2001, + name: "鹰眼瞄准镜", + type: EquipType.ACCESSORY, + quality: 5, + suitType: SuitType.EAGLE, + effects: [ + { type: EffectType.CRIT_RATE, value: 20, isPercent: true }, + { type: EffectType.RANGE, value: 15, isPercent: true } + ], + skillEffects: [ + { + skillId: 1002, + effects: { + dmgBonus: 15 + } + } + ], + description: "能够看穿敌人弱点的神奇瞄准镜" + }, + + // 寒冰套装 + 3001: { + id: 3001, + name: "永冻之杖", + type: EquipType.WEAPON, + quality: 5, + suitType: SuitType.FROST, + effects: [ + { type: EffectType.ATK, value: 80 }, + { type: EffectType.SKILL_CD, value: 10, isPercent: true } + ], + skillEffects: [ + { + skillId: 1003, + effects: { + dmgBonus: 25, + special: "技能附带20%减速效果" + } + } + ], + description: "蕴含着永恒冰霜之力的法杖" + } + // ... 可以继续添加更多装备 +}