feat(movement): 添加移动速度属性并调整速度计算逻辑
- 在DBuff和Attrs中新增移动速度相关字段SPEED - 修改getAttrFieldFromDebuff映射,支持移动速度下降Debuff - 修正DbuffConf接口中deV拼写错误 - BattleMoveSystem中使用Attrs.SPEED替代原慢速减值计算速度 - HeroViewComp中修复deV字段拼写并更新减速效果处理逻辑 - 移除未使用和无效的状态类Debuff标记,优化逻辑判断
This commit is contained in:
@@ -111,6 +111,7 @@ export enum DBuff {
|
||||
DODGE = 12, //-闪避 - 对应Attrs.DODGE (闪避), BType.RATIO
|
||||
DBUFFUP=13, //edbuff效果提升
|
||||
BUFF_DOWN = 14,// buff效果减弱
|
||||
SPEED = 15, //移动速度下降 - 对应Attrs.MOVE_SPEED (移动速度), BType.RATIO
|
||||
}
|
||||
|
||||
|
||||
@@ -142,6 +143,7 @@ export enum Attrs {
|
||||
BUFF_UP = 24, //buff效果提升
|
||||
DBUFF_UP=25, //debuff效果提升
|
||||
DIS=26, //攻击距离
|
||||
SPEED = 27, //移动速度加成,默认都是百分比
|
||||
}
|
||||
|
||||
export const getAttrs=()=>{
|
||||
@@ -172,9 +174,7 @@ export const getAttrFieldFromDebuff = (debuffType: DBuff): number => {
|
||||
// 状态类 debuff(只需缓存,不影响属性)
|
||||
const stateDebuffSet = new Set<DBuff>([
|
||||
DBuff.STUN,
|
||||
DBuff.SLOW,
|
||||
DBuff.FROST,
|
||||
DBuff.BURN,
|
||||
]);
|
||||
|
||||
// 检查是否是状态类 debuff
|
||||
@@ -200,6 +200,8 @@ export const getAttrFieldFromDebuff = (debuffType: DBuff): number => {
|
||||
[DBuff.DODGE]: Attrs.DODGE, // -闪避 -> 闪避
|
||||
[DBuff.DBUFFUP]: Attrs.DBUFF_UP, // debuff提升 -> debuff提升
|
||||
[DBuff.BUFF_DOWN]: Attrs.BUFF_UP, // buff减弱 -> buff效果
|
||||
[DBuff.SPEED]: Attrs.SPEED, // 移动速度下降 -> 移动速度
|
||||
|
||||
};
|
||||
|
||||
const attrField = debuffAttrMap[debuffType];
|
||||
@@ -287,9 +289,9 @@ export const HeroSkillList = [6001,6001,6001,6001,6001,6001]
|
||||
export interface DbuffConf {
|
||||
debuff: DBuff; // debuff类型
|
||||
BType:BType //buff是数值型还是百分比型
|
||||
dev: number; // 效果值 (原deV)
|
||||
deV: number; // 效果值
|
||||
deC: number; // 持续时间
|
||||
deR: number; // 触发概率 (原deR)
|
||||
deR: number; // 触发概率
|
||||
}
|
||||
export interface BuffConf {
|
||||
buff:Attrs;
|
||||
|
||||
Reference in New Issue
Block a user