feat(movement): 添加移动速度属性并调整速度计算逻辑

- 在DBuff和Attrs中新增移动速度相关字段SPEED
- 修改getAttrFieldFromDebuff映射,支持移动速度下降Debuff
- 修正DbuffConf接口中deV拼写错误
- BattleMoveSystem中使用Attrs.SPEED替代原慢速减值计算速度
- HeroViewComp中修复deV字段拼写并更新减速效果处理逻辑
- 移除未使用和无效的状态类Debuff标记,优化逻辑判断
This commit is contained in:
2025-10-17 10:54:02 +08:00
parent d8ba69aada
commit d9282b7469
3 changed files with 17 additions and 16 deletions

View File

@@ -40,7 +40,7 @@ const { ccclass, property } = _decorator;
* const dbuffConf: DbuffConf = {
* debuff: DBuff.STUN, // 眩晕
* BType: BType.VALUE, // 数值型
* dev: 20, // 减少值
* deV: 20, // 减少值
* deC: 3, // 持续3秒
* deR: 100 // 触发概率(100%)
* };
@@ -386,7 +386,7 @@ export class HeroViewComp extends CCComp {
for (const debuff of this.V_DBUFF) {
// 跳过状态类 debuffattrField === -1
if (debuff.attrField !== undefined && debuff.attrField >= 0) {
this.Attrs[debuff.attrField] -= debuff.dev;
this.Attrs[debuff.attrField] -= debuff.deV;
}
}
@@ -394,7 +394,7 @@ export class HeroViewComp extends CCComp {
for (const debuff of this.V_DBUFFS) {
// 跳过状态类 debuffattrField === -1
if (debuff.attrField !== undefined && debuff.attrField >= 0) {
this.Attrs[debuff.attrField] -= debuff.dev;
this.Attrs[debuff.attrField] -= debuff.deV;
}
}
}
@@ -417,7 +417,7 @@ export class HeroViewComp extends CCComp {
// 跳过状态类 debuffattrField === -1
if (debuff.attrField !== undefined && debuff.attrField >= 0) {
const baseVal = baseValues[debuff.attrField] || this.Attrs[debuff.attrField];
this.Attrs[debuff.attrField] -= Math.floor(baseVal * (debuff.dev / 100));
this.Attrs[debuff.attrField] -= Math.floor(baseVal * (debuff.deV / 100));
}
}
@@ -426,7 +426,7 @@ export class HeroViewComp extends CCComp {
// 跳过状态类 debuffattrField === -1
if (debuff.attrField !== undefined && debuff.attrField >= 0) {
const baseVal = baseValues[debuff.attrField] || this.Attrs[debuff.attrField];
this.Attrs[debuff.attrField] -= Math.floor(baseVal * (debuff.dev / 100));
this.Attrs[debuff.attrField] -= Math.floor(baseVal * (debuff.deV / 100));
}
}
}