From 8663ae80e50cb0fe09927a6d404393f443b7a435 Mon Sep 17 00:00:00 2001 From: panw Date: Wed, 11 Mar 2026 18:08:01 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E8=8B=B1=E9=9B=84=E5=B1=9E=E6=80=A7):=20?= =?UTF-8?q?=E6=89=A9=E5=B1=95=E8=8B=B1=E9=9B=84=E5=B1=9E=E6=80=A7=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E4=BB=A5=E6=94=AF=E6=8C=81=E6=96=B0=E6=B8=B8=E6=88=8F?= =?UTF-8?q?=E6=9C=BA=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 新增攻击速度、技能速度、暴击、命中及多种特殊效果属性。 添加武器进化相关属性如穿刺和风怒。 在重置方法中初始化所有新增属性,确保状态一致性。 --- assets/script/game/hero/HeroAttrsComp.ts | 44 +++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/assets/script/game/hero/HeroAttrsComp.ts b/assets/script/game/hero/HeroAttrsComp.ts index c71cda2b..059d95ec 100644 --- a/assets/script/game/hero/HeroAttrsComp.ts +++ b/assets/script/game/hero/HeroAttrsComp.ts @@ -36,6 +36,31 @@ export class HeroAttrsComp extends ecs.Comp { shield: number = 0; // 当前护盾 shield_max: number = 0; // 最大护盾值 + // ==================== 攻击属性 (补充) ==================== + as: number = 0; // 攻击速度(减少技能skills[0]CD) + ss: number = 0; // 技能速度 (减少skills[0] 以外的cd) + + // ==================== 暴击与命中属性 ==================== + critical: number = 0; // 暴击率 + critical_dmg: number = 0; // 暴击伤害 + + // ==================== 特殊效果属性 ==================== + freeze_chance: number = 0; // 冰冻概率 + stun_chance: number = 0; // 眩晕概率 + back_chance: number = 0; // 击退概率 + slow_chance: number = 0; // 减速概率 + + // ==================== 增益效果属性 ==================== + revive_count: number = 0; // 复活次数 + revive_time: number = 0; // 复活时间 + invincible_time: number = 0;// 无敌时间 + + // ==================== 武器进化相关 ==================== + puncture: number = 0; // 穿刺次数 + puncture_dmg: number = 0; // 穿刺伤害 + wfuny: number = 0; // 风怒 + boom: boolean = false; // 自爆怪 + // ==================== 脏标签标记 ==================== dirty_hp: boolean = false; // 血量变更标记 @@ -189,6 +214,24 @@ export class HeroAttrsComp extends ecs.Comp { this.hp = 100; this.shield = 0; this.shield_max = 0; + + // 重置新增属性 + this.as = 0; + this.ss = 0; + this.critical = 0; + this.critical_dmg = 0; + this.freeze_chance = 0; + this.stun_chance = 0; + this.back_chance = 0; + this.slow_chance = 0; + this.revive_count = 0; + this.revive_time = 0; + this.invincible_time = 0; + this.puncture = 0; + this.puncture_dmg = 0; + this.wfuny = 0; + this.boom = false; + this.BUFFS = {}; this.DEBUFFS = {}; // 重置技能距离缓存 @@ -211,7 +254,6 @@ export class HeroAttrsComp extends ecs.Comp { this.dirty_hp = false; this.dirty_mp = false; this.dirty_shield = false; - smc.updateHeroInfo(this); }