refactor(属性系统): 重构英雄属性系统,将属性定义移至HeroAttrs模块
- 将Attrs和DBuff相关定义从SkillSet迁移至HeroAttrs - 新增NeAttrs枚举用于管理负面状态 - 重构HeroViewComp中的buff/debuff处理逻辑 - 优化属性分类和分组,增加新属性类型 - 移除旧的DBuff相关代码,改用统一的负面状态管理
This commit is contained in:
@@ -8,8 +8,9 @@ import { BoxSet, FacSet } from "../common/config/BoxSet";
|
||||
import { HeroInfo, HeroPos, HType } from "../common/config/heroSet";
|
||||
import { BattleMoveComp } from "../common/ecs/position/BattleMoveComp";
|
||||
import { GameEvent } from "../common/config/GameEvent";
|
||||
import { Attrs, getAttrs, SkillSet } from "../common/config/SkillSet";
|
||||
import { SkillSet } from "../common/config/SkillSet";
|
||||
import { time } from "console";
|
||||
import { getNeAttrs, getAttrs ,Attrs} from "../common/config/HeroAttrs";
|
||||
/** 角色实体 */
|
||||
@ecs.register(`Hero`)
|
||||
|
||||
@@ -84,6 +85,7 @@ export class Hero extends ecs.Entity {
|
||||
hv.base_dis=hero.dis
|
||||
hv.base_speed=hero.speed
|
||||
hv.Attrs=getAttrs()
|
||||
hv.NeAttrs=getNeAttrs()
|
||||
hv.hp=hv.Attrs[Attrs.HP_MAX]=hv.base_hp
|
||||
hv.mp=hv.Attrs[Attrs.MP_MAX]=hv.base_mp
|
||||
hv.Attrs[Attrs.DEF]=hv.base_def
|
||||
|
||||
Reference in New Issue
Block a user