refactor(英雄属性): 移除魔法攻击相关属性并重构天赋系统

- 移除英雄和怪物类中的魔法攻击(MAP)相关属性
- 重命名getRandomOptions为getNormalBuffs以更准确表达功能
- 新增getTalentOptions函数用于从天赋池中随机获取天赋
- 清理无用注释和空行
This commit is contained in:
panw
2025-12-26 11:01:09 +08:00
parent 8eedc2b4dd
commit dd8536833a
5 changed files with 30 additions and 13 deletions

View File

@@ -22,7 +22,6 @@ export class HeroAttrsComp extends ecs.Comp {
// ==================== 基础属性(有初始值) ====================
base_ap: number = 0; // 基础攻击
base_map: number = 0; // 基础魔法攻击
base_def: number = 5; // 基础防御
base_hp: number = 100; // 基础血量
base_mp: number = 100; // 基础魔法值
@@ -91,7 +90,6 @@ export class HeroAttrsComp extends ecs.Comp {
this.Attrs[Attrs.MP_MAX] = this.base_mp;
this.Attrs[Attrs.DEF] = this.base_def;
this.Attrs[Attrs.AP] = this.base_ap;
this.Attrs[Attrs.MAP] = this.base_map;
this.Attrs[Attrs.SPEED] = this.base_speed;
this.Attrs[Attrs.DIS] = this.base_dis;
@@ -103,7 +101,6 @@ export class HeroAttrsComp extends ecs.Comp {
attrIndex !== Attrs.MP_MAX &&
attrIndex !== Attrs.DEF &&
attrIndex !== Attrs.AP &&
attrIndex !== Attrs.MAP &&
attrIndex !== Attrs.SPEED &&
attrIndex !== Attrs.DIS
) {
@@ -189,7 +186,6 @@ export class HeroAttrsComp extends ecs.Comp {
case Attrs.MP_MAX: return this.base_mp;
case Attrs.DEF: return this.base_def;
case Attrs.AP: return this.base_ap;
case Attrs.MAP: return this.base_map;
case Attrs.SPEED: return this.base_speed;
case Attrs.DIS: return this.base_dis;
case Attrs.SHIELD_MAX: return 0;
@@ -533,7 +529,6 @@ export class HeroAttrsComp extends ecs.Comp {
this.type = 0;
this.fac = 0;
this.base_ap = 0;
this.base_map = 0;
this.base_def = 5;
this.base_hp = 100;
this.base_mp = 100;