feat(effect): 添加效果系统模块 (#332)

实现 Buff/Debuff 效果管理和属性修改器系统:

核心功能:
- 效果容器管理效果的应用、移除和更新
- 支持持续时间类型: 永久/计时/条件
- 支持叠加规则: 刷新/叠加/独立/替换/忽略
- 效果标签系统用于分类和查询
- 效果优先级和互斥标签支持
- 效果事件系统 (应用/移除/叠加/刷新/跳动/过期)

修改器系统:
- 属性修改器支持加法/乘法/覆盖/最小值/最大值操作
- 优先级分层计算 (基础/加法/乘法/最终)
- 数值计算器自动按优先级应用修改器

蓝图节点 (12个):
- ApplyEffect: 应用效果
- RemoveEffect/RemoveEffectByTag: 移除效果
- HasEffect/HasEffectTag: 检查效果
- GetEffectStacks/GetEffectRemainingTime/GetEffectCount: 查询效果
- ClearAllEffects: 清除所有效果
- OnEffectApplied/OnEffectRemoved/OnEffectTick: 效果事件
This commit is contained in:
YHH
2025-12-25 15:17:06 +08:00
committed by GitHub
parent 275124b66c
commit 4d501ba448
15 changed files with 1917 additions and 0 deletions

28
pnpm-lock.yaml generated
View File

@@ -923,6 +923,34 @@ importers:
specifier: ^5.0.8
version: 5.0.8(@types/react@18.3.27)(react@18.3.1)(use-sync-external-store@1.6.0(react@18.3.1))
packages/effect:
dependencies:
tslib:
specifier: ^2.8.1
version: 2.8.1
devDependencies:
'@esengine/blueprint':
specifier: workspace:*
version: link:../blueprint
'@esengine/build-config':
specifier: workspace:*
version: link:../build-config
'@esengine/ecs-framework':
specifier: workspace:*
version: link:../core
'@types/node':
specifier: ^20.19.17
version: 20.19.25
rimraf:
specifier: ^5.0.0
version: 5.0.10
tsup:
specifier: ^8.0.0
version: 8.5.1(@microsoft/api-extractor@7.55.1(@types/node@20.19.25))(@swc/core@1.15.3)(jiti@2.6.1)(postcss@8.5.6)(tsx@4.21.0)(typescript@5.9.3)(yaml@2.8.1)
typescript:
specifier: ^5.8.3
version: 5.9.3
packages/engine:
devDependencies:
rimraf: