From 08fbb72d19e00703a870859c373e16e6b62223f0 Mon Sep 17 00:00:00 2001 From: walkpan Date: Thu, 19 Mar 2026 18:58:19 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E7=A7=BB=E9=99=A4=E6=9C=AA?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E7=9A=84=E7=9C=A9=E6=99=95=E3=80=81=E5=87=8F?= =?UTF-8?q?=E9=80=9F=E5=92=8C=E7=A9=BF=E5=88=BA=E4=BC=A4=E5=AE=B3=E5=B1=9E?= =?UTF-8?q?=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 清理技能和英雄属性相关的未使用代码,包括: - 移除 HSkillComp 中的 stun_chance、slow_chance 和 puncture_dmg 默认值 - 删除 SkillSet 接口中的 stn 和 slw 字段 - 精简 HeroAttrs 枚举,移除 critical_dmg、stun_chance、slow_chance、puncture_dmg 等未使用属性 - 简化 HeroAttrsComp 类中的属性定义和注释 这些属性在当前游戏逻辑中未被使用,移除以减少代码复杂性和维护负担。 --- assets/script/game/common/config/HeroAttrs.ts | 9 --------- assets/script/game/common/config/SkillSet.ts | 2 -- assets/script/game/hero/HeroAttrsComp.ts | 9 +-------- assets/script/game/map/HSkillComp.ts | 3 --- 4 files changed, 1 insertion(+), 22 deletions(-) diff --git a/assets/script/game/common/config/HeroAttrs.ts b/assets/script/game/common/config/HeroAttrs.ts index b7db0716..3592db82 100644 --- a/assets/script/game/common/config/HeroAttrs.ts +++ b/assets/script/game/common/config/HeroAttrs.ts @@ -24,14 +24,10 @@ export enum Attrs { // ==================== 暴击与命中属性 ==================== critical = "critical", // 暴击率 - critical_dmg = "critical_dmg", // 暴击伤害 // ==================== 特殊效果属性 ==================== freeze_chance = "freeze_chance", // 冰冻概率 - stun_chance = "stun_chance", // 眩晕概率 back_chance = "back_chance", // 击退概率 - slow_chance = "slow_chance", // 减速概率 - // ==================== 增益效果属性 ==================== revive_count = "revive_count", // 复活次数 revive_time = "revive_time", // 复活时间 @@ -39,12 +35,7 @@ export enum Attrs { // ==================== 武器进化相关 ==================== puncture = "puncture", // 穿刺次数 - puncture_dmg = "puncture_dmg", // 穿刺伤害 wfuny = "wfuny", // 风怒 - - // ==================== 状态类 Debuff ==================== - IN_FROST = "IN_FROST", // 冰冻状态 - IN_STUN = "IN_STUN", // 眩晕状态 } /** diff --git a/assets/script/game/common/config/SkillSet.ts b/assets/script/game/common/config/SkillSet.ts index 4495cf58..1947a3e1 100644 --- a/assets/script/game/common/config/SkillSet.ts +++ b/assets/script/game/common/config/SkillSet.ts @@ -176,9 +176,7 @@ export interface SkillConfig { kind?:SkillKind, // 主效果类型 crt?:number, // 额外暴击率 frz?:number, // 额外冰冻概率 - stn?:number, // 额外眩晕概率 bck?:number, // 额外击退概率 - slw?:number, // 额外减速概 buffs:number[], // 对施法者的buff配置列表(Buff UUID 列表) call_hero?:number, // 召唤技能召唤英雄id(可选) info:string, // 技能描述 diff --git a/assets/script/game/hero/HeroAttrsComp.ts b/assets/script/game/hero/HeroAttrsComp.ts index bf189c8b..53517e6b 100644 --- a/assets/script/game/hero/HeroAttrsComp.ts +++ b/assets/script/game/hero/HeroAttrsComp.ts @@ -29,29 +29,22 @@ export class HeroAttrsComp extends ecs.Comp { s_cd: number = 0; // 技能计时 a_cd_max: number = 0; // 攻击CD s_cd_max: number = 0; // 技能CD - // ==================== 暴击与命中属性 ==================== + // ==================== 特殊属性 ==================== critical: number = 0; // 暴击率 - - // ==================== 特殊效果属性 ==================== freeze_chance: number = 0; // 冰冻概率 back_chance: number = 0; // 击退概率 - - // ==================== 武器进化相关 ==================== puncture: number = 0; // 穿刺次数 wfuny: number = 0; // 风怒 - // ==================== 增益效果属性 ==================== revive_count: number = 0; // 复活次数 revive_time: number = 0; // 复活时间 invincible_time: number = 0;// 无敌时间 - in_frost=false frost_end_time: number = 0; boom: boolean = false; // 自爆怪 - // ==================== 脏标签标记 ==================== dirty_hp: boolean = false; // 血量变更标记 dirty_shield: boolean = false; // 护盾变更标记 diff --git a/assets/script/game/map/HSkillComp.ts b/assets/script/game/map/HSkillComp.ts index ee724d47..a9f9c8f0 100644 --- a/assets/script/game/map/HSkillComp.ts +++ b/assets/script/game/map/HSkillComp.ts @@ -141,11 +141,8 @@ export class HSkillComp extends CCComp { critical: 0, critical_dmg: 50, freeze_chance: 0, - stun_chance: 0, back_chance: 0, - slow_chance: 0, puncture: 0, - puncture_dmg: 0, wfuny: 0, fac: FacSet.HERO };