refactor(配置): 调整英雄属性和全局加成数值

- 将物理防御属性类型从百分比改为数值型
- 降低全局生命加成并替换速度加成为闪避率加成
- 更新英雄属性计算以使用闪避率而非速度
- 启用 MissionCardComp 的调试模式以方便测试
This commit is contained in:
panw
2026-02-06 16:50:04 +08:00
parent b48547b1f1
commit 84963f6a3b
4 changed files with 2532 additions and 12650 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -143,9 +143,9 @@ export class SingletonModuleComp extends ecs.Comp {
// 全局属性加成 {attrIndex: [value, count]}
global_attrs: Record<number, [number, number]> = {
[Attrs.AP]: [1, 0], // 攻击力
[Attrs.HP_MAX]: [100, 100], // 生命上限
[Attrs.HP_MAX]: [10, 10], // 生命上限
[Attrs.DEF]: [1, 0], // 防御
[Attrs.SPEED]: [1, 0], // 速度
[Attrs.DODGE]: [1, 0], // 闪避率
[Attrs.CRITICAL]: [1, 0], // 暴击率
[Attrs.STUN_CHANCE]: [1, 0], // 眩晕率
[Attrs.WFUNY]: [1, 0], // 风怒率
@@ -393,7 +393,7 @@ export class SingletonModuleComp extends ecs.Comp {
h.mp_max = Math.floor(heroAttrs.Attrs[Attrs.MP_MAX] || 0);
h.def = Math.floor(heroAttrs.Attrs[Attrs.DEF] || 0);
h.ap = Math.floor(heroAttrs.Attrs[Attrs.AP] || 0);
h.speed = Math.floor(heroAttrs.Attrs[Attrs.SPEED] || 0);
h.dodge = Math.floor(heroAttrs.Attrs[Attrs.DODGE] || 0);
h.crt = Math.floor(heroAttrs.Attrs[Attrs.CRITICAL] || 0);
h.as = Math.floor(heroAttrs.Attrs[Attrs.AS] || 0);

View File

@@ -146,7 +146,7 @@ export const AttrsType: Record<Attrs, BType> = {
[Attrs.AREA_OF_EFFECT]: BType.VALUE, // 作用范围 - 数值型
// ========== 防御属性(混合类型) ==========
[Attrs.DEF]: BType.RATIO, // 物理防御 - 百分比
[Attrs.DEF]: BType.VALUE, // 物理防御 - 数值
[Attrs.DODGE]: BType.RATIO, // 闪避率 - 百分比型
[Attrs.THORNS]: BType.RATIO, // 反伤 - 百分比型

View File

@@ -28,9 +28,7 @@ interface ICardEvent {
@ccclass('MissionCardComp')
@ecs.register('MissionCard', false)
export class MissionCardComp extends CCComp {
@property({ tooltip: "是否启用调试日志" })
private debugMode: boolean = false;
private debugMode: boolean = true;
/** 视图层逻辑代码分离演示 */
@property(Node)
card1:Node = null!