refactor(英雄配置): 移除英雄配置中的mp和def属性

简化英雄属性配置,移除不再使用的法力值(mp)和防御力(def)属性
This commit is contained in:
walkpan
2026-03-11 23:24:31 +08:00
parent 87b21864b1
commit ce2cd05ba9
2 changed files with 59 additions and 21 deletions

View File

@@ -84,10 +84,8 @@ export enum HeroConf{
}
export const getPreAttr = (uuid:number)=>{
let hp=HeroInfo[uuid].hp/HeroConf.MAX_HP
let mp=HeroInfo[uuid].mp/HeroConf.MAX_MP
let ap=HeroInfo[uuid].ap/HeroConf.MAX_AP
let def=HeroInfo[uuid].def/HeroConf.MAX_DEF
return {hp:hp,mp:mp,ap:ap,def:def}
return {hp:hp,ap:ap,}
}
export enum HRegen {
HP=0.5
@@ -124,9 +122,7 @@ export interface heroInfo {
type: HType; // 职业定位(战士/远程/法师/辅助/刺客)
lv: number; // 初始等级
hp: number; // 生命值上限
mp: number; // 法力值上限
ap: number; // 攻击力
def: number; // 防御(伤害减免)
// dis: number; // 攻击距离(像素)
rangeType: SkillRange; // 攻击距离类型 (近/中/远)
speed: number; // 移动速度(像素/秒)
@@ -150,37 +146,37 @@ export const HeroInfo: Record<number, heroInfo> = {
// ========== 英雄角色 ==========
5001:{uuid:5001,name:"盾战士",icon:"1001",path:"hk1", fac:FacSet.HERO, kind:1,as:1,ss:5,
type:HType.warrior,lv:1,hp:300,mp:200,def:5,ap:25,speed:120,skills:[6001,6004],
type:HType.warrior,lv:1,hp:300,ap:25,speed:120,skills:[6001,6004],
rangeType: SkillRange.Melee,
buff:[],info:"盾战士"},
5002:{uuid:5002,name:"奥术法师",icon:"1001",path:"hm2", fac:FacSet.HERO, kind:2,as:1,ss:5,
type:HType.mage,lv:1,hp:150,mp:135,def:0,ap:40,speed:95,skills:[6003,6101],
type:HType.mage,lv:1,hp:150,ap:40,speed:95,skills:[6003,6101],
rangeType: SkillRange.Long,
buff:[],info:"奥术法师"},
5003:{uuid:5003,name:"射手",icon:"1001",path:"ha1", fac:FacSet.HERO, kind:2,as:1,ss:5,
type:HType.remote,lv:1,hp:180,mp:80,def:0,ap:30,speed:140,skills:[6002,6100],
type:HType.remote,lv:1,hp:180,ap:30,speed:140,skills:[6002,6100],
rangeType: SkillRange.Long,
buff:[],info:"射手"},
5005:{uuid:5005,name:"牧师",icon:"1001",path:"hh1", fac:FacSet.HERO, kind:2,as:1,ss:5,
type:HType.mage,lv:1,hp:160,mp:135,def:0,ap:25,speed:100,skills:[6003,6100],
type:HType.mage,lv:1,hp:160,ap:25,speed:100,skills:[6003,6100],
rangeType: SkillRange.Mid,
buff:[],info:"牧师"},
5004:{uuid:5004,name:"火焰法师",icon:"1001",path:"hm1", fac:FacSet.HERO, kind:2,as:1,ss:5,
type:HType.mage,lv:1,hp:150,mp:140,def:0,ap:45,speed:90,skills:[6003,6101],
type:HType.mage,lv:1,hp:150,ap:45,speed:90,skills:[6003,6101],
rangeType: SkillRange.Mid,
buff:[],info:"火焰法师"},
5006:{uuid:5006,name:"召唤法师",icon:"1001",path:"hz1", fac:FacSet.HERO, kind:2,as:1,ss:5,
type:HType.support,lv:1,hp:200,mp:145,def:0,ap:20,speed:105,skills:[6003,6101],
type:HType.support,lv:1,hp:200,ap:20,speed:105,skills:[6003,6101],
rangeType: SkillRange.Mid,
buff:[],info:"召唤法师"},
5007:{uuid:5007,name:"刺客",icon:"1001",path:"hc1", fac:FacSet.HERO, kind:1,as:1,ss:5,
type:HType.assassin,lv:1,hp:140,mp:60,def:0,ap:50,speed:180,skills:[6001,6004],
type:HType.assassin,lv:1,hp:140,ap:50,speed:180,skills:[6001,6004],
rangeType: SkillRange.Melee,
buff:[],info:"刺客"},
@@ -189,50 +185,50 @@ export const HeroInfo: Record<number, heroInfo> = {
// 1. 基础近战型
5201:{uuid:5201,name:"兽人战士",icon:"1001",path:"mo1", fac:FacSet.MON, kind:1,as:3.0,ss:10,
type:HType.warrior,lv:1,hp:60,mp:100,def:0,ap:8,speed:180,skills:[6003],
type:HType.warrior,lv:1,hp:60,ap:8,speed:180,skills:[6003],
rangeType: SkillRange.Long,
buff:[],info:"标准炮灰确保英雄能完成3次普攻积累天赋计数"},
// 2. 快速突击型
5301:{uuid:5301,name:"兽人斥候",icon:"1001",path:"mo1", fac:FacSet.MON, kind:1,as:1.2,ss:10,
type:HType.assassin,lv:1,hp:40,mp:100,def:0,ap:12,speed:400,skills:[6003],
type:HType.assassin,lv:1,hp:40,ap:12,speed:400,skills:[6003],
rangeType: SkillRange.Long,
buff:[],info:"快速突击:极高移速贴脸,检测护盾(7102)刷新率"},
// 3. 重型坦克型
5401:{uuid:5401,name:"兽人卫士",icon:"1001",path:"mo3", fac:FacSet.MON, kind:1,as:5.0,ss:10,
type:HType.warrior,lv:1,hp:200,mp:100,def:5,ap:15,speed:60,skills:[6003],
type:HType.warrior,lv:1,hp:200,ap:15,speed:60,skills:[6003],
rangeType: SkillRange.Long,
buff:[],info:"重型坦克:数值墙,检测玩家破甲(7008)与持续输出"},
// 4. 远程骚扰型
5501:{uuid:5501,name:"兽人射手",icon:"1001",path:"mo1", fac:FacSet.MON, kind:1,as:3.0,ss:10,
type:HType.remote,lv:1,hp:50,mp:100,def:0,ap:10,speed:90,skills:[6203],
type:HType.remote,lv:1,hp:50,ap:10,speed:90,skills:[6203],
rangeType: SkillRange.Long,
buff:[],info:"远程骚扰:跨屏打击,迫使阵地分散或移动英雄"},
// 5. 特殊机制型
5601:{uuid:5601,name:"兽人自爆兵",icon:"1001",path:"mo1", fac:FacSet.MON, kind:1,as:3.0,ss:10,
type:HType.assassin,lv:1,hp:80,mp:100,def:0,ap:200,speed:220,skills:[6003],
type:HType.assassin,lv:1,hp:80,ap:200,speed:220,skills:[6003],
rangeType: SkillRange.Long,
buff:[],info:"特殊机制:极端伤害,漏怪即秒杀,检测减伤(7103)"},
// 召唤师:持续召唤小怪(后续可在技能系统中实现 SType.zhaohuan
5602:{uuid:5602,name:"兽人召唤师",icon:"1001",path:"mo1", fac:FacSet.MON, kind:1,as:3.0,ss:10,
type:HType.mage,lv:1,hp:150,mp:300,def:5,ap:10,speed:100,skills:[6003],
type:HType.mage,lv:1,hp:150,ap:10,speed:100,skills:[6003],
rangeType: SkillRange.Long,
buff:[],info:"战术目标:持续召唤小怪,检测英雄大招清场频率"},
// 治疗者:为周围怪物回血(此处以提升治疗效果和生命回复为基础被动)
5603:{uuid:5603,name:"兽人祭司",icon:"1001",path:"mo1", fac:FacSet.MON, kind:1,as:3.0,ss:10,
type:HType.support,lv:1,hp:150,mp:300,def:5,ap:10,speed:105,skills:[6003],
type:HType.support,lv:1,hp:150,ap:10,speed:105,skills:[6003],
rangeType: SkillRange.Long,
buff:[],info:"战术目标:为怪群回血,检测玩家沉默(7006)覆盖率"},
// 光环怪为周围怪物提供增益此处以Buff效果提升与移动速度提升为基础被动
// Attrs.BUFF_UP=60 (RATIO=1)Attrs.SPEED=63 (RATIO=1)
5604:{uuid:5604,name:"兽人图腾师",icon:"1001",path:"mo1", fac:FacSet.MON, kind:1,as:3.0,ss:10,
type:HType.support,lv:1,hp:150,mp:250,def:5,ap:10,speed:110,skills:[6003],
type:HType.support,lv:1,hp:150,ap:10,speed:110,skills:[6003],
rangeType: SkillRange.Long,
buff:[],info:"战术目标:提供加速光环,改变怪群推进节奏"},
// 6. 精英/BOSS型
5701:{uuid:5701,name:"兽人首领(BOSS)",icon:"1001",path:"mo4", fac:FacSet.MON, kind:1,as:2.5,ss:10,
type:HType.warrior,lv:3,hp:2000,mp:500,def:10,ap:60,speed:120,skills:[6003],
type:HType.warrior,lv:3,hp:2000,ap:60,speed:120,skills:[6003],
rangeType: SkillRange.Long,
buff:[],info:"终极考验极高HP检测大招重置与辐射协同输出"},
};

View File

@@ -0,0 +1,42 @@
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
import { Vec3, v3 } from "cc";
import { HeroAttrsComp } from "./HeroAttrsComp";
import { HeroViewComp } from "./HeroViewComp";
import { HSSet, SkillSet, SType, TGroup, SkillConfig } from "../common/config/SkillSet";
import { Skill } from "../skill/Skill";
import { smc } from "../common/SingletonModuleComp";
import { BoxSet, FacSet } from "../common/config/GameSet";
import { GameConst } from "../common/config/GameConst";
import { Attrs } from "../common/config/HeroAttrs";
import { mLogger } from "../common/Logger";
/**
* ==================== 自动施法系统 ====================
*
* 职责:
* 1. 检测可施放的技能
* 2. 根据策略自动施法AI
* 3. 选择目标
* 4. 添加施法请求标记
*
* 设计理念:
* - 负责"何时施法"的决策
* - 通过添加 CSRequestComp 触发施法
* - 可被玩家输入系统或AI系统复用
* - 支持多种AI策略
*/
@ecs.register('SCastSystem')
export class SCastSystem extends ecs.ComblockSystem implements ecs.ISystemUpdate {
debugMode: boolean = false; // 是否启用调试模式
filter(): ecs.IMatcher {
return ecs.allOf(HeroAttrsComp, HeroViewComp);
}
update(e: ecs.Entity): void {
if(!smc.mission.play ) return;
if(smc.mission.pause) return
}
}