Files
pixelheros/assets/script/game/common/config/heroSet.ts
walkpan ffa6bbec6f feat(战斗系统): 扩展为4条战斗线路并调整相关配置
- 将战斗线路从2条扩展为4条,新增LINE3和LINE4
- 修改Monster生成逻辑以支持4条线路
- 更新英雄刘邦的技能配置
- 调整基础攻击技能消耗为0
- 更新地图预制体以包含新增线路
2026-01-02 00:03:07 +08:00

206 lines
8.7 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import { v3 } from "cc"
import { BoxSet, FacSet } from "./GameSet"
import { smc } from "../SingletonModuleComp"
import { BuffConf } from "./SkillSet"
export enum AttrSet {
ATTR_MAX = 85,
}
export enum HType {
warrior = 0,
remote = 1,
mage = 2,
support = 3,
assassin = 4,
}
export const HTypeName ={
0:"战士",
1:"远程",
2:"法师",
3:"辅助",
4:"刺客",
}
//fac:FacSet.HERO
export const getHeroList = ()=>{
const filteredHeros = Object.values(HeroInfo).filter(item=>{
const facMatch = item.fac === FacSet.HERO;
return facMatch;
});
// 根据smc.heros中的数据分离拥有和未拥有的英雄
// smc.heros是一个包含英雄ID的数组如[5001, 5002]
const ownedHeros = filteredHeros.filter(item => smc.heros.includes(item.uuid));
const unownedHeros = filteredHeros.filter(item => !smc.heros.includes(item.uuid));
// 合并列表:拥有的在前,未拥有的在后
return [...ownedHeros, ...unownedHeros].map(item => item.uuid);
}
//fac:FacSet.MON
export const getMonList = ()=>{
return Object.values(HeroInfo).filter(item=>{
const facMatch = item.fac === FacSet.MON;
return facMatch ;
}).map(item=>item.uuid)
}
export const HeroPos={
0:{pos:v3(-240,BoxSet.GAME_LINE,0)},
1:{pos:v3(0,BoxSet.GAME_LINE,0)},
2:{pos:v3(0,BoxSet.GAME_LINE,0)},
}
export const MonSet = {
0:{pos:v3(240,BoxSet.GAME_LINE+10,0)},
1:{pos:v3(240,BoxSet.GAME_LINE-10,0)},
2:{pos:v3(300,BoxSet.GAME_LINE+10,0)},
3:{pos:v3(300,BoxSet.GAME_LINE-10,0)},
4:{pos:v3(320,BoxSet.GAME_LINE+10,0)},
5:{pos:v3(320,BoxSet.GAME_LINE-10,0)},
6:{pos:v3(360,BoxSet.GAME_LINE+10,0)},
7:{pos:v3(360,BoxSet.GAME_LINE-10,0)},
8:{pos:v3(400,BoxSet.GAME_LINE+10,0)},
9:{pos:v3(400,BoxSet.GAME_LINE-10,0)},
10:{pos:v3(440,BoxSet.GAME_LINE+10,0)},
11:{pos:v3(440,BoxSet.GAME_LINE-10,0)},
}
export enum MonStart {
SLINE_1=130, //上线y
SLINE_2=110, //下线y
SLINE_3=150, //下线y
SLINE_4=90, //y起始点
START_X=240, //x起始点
START_I=60, //x轴间隔
}
export enum HeroConf{
COST=1500,
MAX_HP=200,
MAX_MP=200,
MAX_AP=20,
MAX_DEF=20,
}
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}
}
export enum HeroUpSet {
MP=5,
HP=10,
LVMP=100,
LVHP=100,
LVATK=10,
LVDEF=5,
}
/**
* 英雄/怪物基础信息接口
*/
export interface heroInfo {
uuid: number; // 唯一标识英雄5000段怪物5200段
name: string; // 显示名称
path: string; // 资源路径(对应美术资源名)
fac: FacSet; // 阵营FacSet.HERO 或 FacSet.MON
kind: number; // 未使用
as: number; // 攻击速度系数(越小越快)
type: HType; // 职业定位(战士/远程/法师/辅助/刺客)
lv: number; // 初始等级
hp: number; // 生命值上限
mp: number; // 法力值上限
ap: number; // 攻击力
def: number; // 防御(伤害减免)
dis: number; // 攻击距离(像素)
speed: number; // 移动速度(像素/秒)
skills: number[]; // 携带技能ID列表
buff: BuffConf[]; // 自带buff配置通常为空由技能动态添加
tal: number[]; // 天赋ID列表
info: string; // 描述文案
}
export const HeroInfo: Record<number, heroInfo> = {
// ========== 英雄角色 ==========
// 刘邦 - 领导型战士(善于用人,知人善任)
5001:{uuid:5001,name:"刘邦",path:"hk1", fac:FacSet.HERO, kind:1,as:1.5,
type:HType.warrior,lv:1,hp:200,mp:200,def:9,ap:15,dis:100,speed:120,skills:[6001,6001],
buff:[],tal:[],info:"楚汉争霸领袖,领导统御型战士"},
// 荆轲 - 刺客(敏捷型,高速度和暴击率)
5002:{uuid:5002,name:"荆轲",path:"hc1", fac:FacSet.HERO, kind:1,as:1.5,
type:HType.assassin,lv:1,hp:80,mp:60,def:3,ap:22,dis:120,speed:180,skills:[6002,6001],
buff:[],tal:[],info:"战国刺客,刺杀专精敏捷型刺客"},
// 赵武灵王 - 远程射手(胡服骑射,机动型高移动速度和远程攻击)
5005:{uuid:5005,name:"赵武灵王",path:"ha1", fac:FacSet.HERO, kind:2,as:1.5,
type:HType.remote,lv:1,hp:100,mp:80,def:6,ap:18,dis:450,speed:140,skills:[6002,6001],
buff:[],tal:[],info:"胡服骑射改革者,机动型高远程输出"},
// 张良 - 智谋法师(运筹帷幄,智谋型法师)
5007:{uuid:5007,name:"张良",path:"hh1", fac:FacSet.HERO, kind:2,as:1.5,
type:HType.mage,lv:1,hp:88,mp:135,def:5,ap:15,dis:350,speed:100,skills:[6002,6001],
buff:[],tal:[],info:"运筹帷幄谋士,智谋型法师"},
// 屈原 - 元素法师(离骚诗韵,元素型高魔法输出)
5008:{uuid:5008,name:"屈原",path:"hm1", fac:FacSet.HERO, kind:2,as:1.5,
type:HType.mage,lv:1,hp:85,mp:140,def:4,ap:16,dis:400,speed:90,skills:[6002,6001],
buff:[],tal:[],info:"离骚诗韵,元素型高魔法输出"},
// 孙膑 - 谋略法师(兵法谋略,谋略型法师)
5009:{uuid:5009,name:"孙膑",path:"hm2", fac:FacSet.HERO, kind:2,as:1.5,
type:HType.mage,lv:1,hp:92,mp:135,def:6,ap:14,dis:420,speed:95,skills:[6002,6001],
buff:[],tal:[],info:"兵法谋略,谋略型法师"},
// 萧何 - 后勤辅助(后勤保障,后勤型辅助)
5010:{uuid:5010,name:"萧何",path:"hz1", fac:FacSet.HERO, kind:2,as:1.5,
type:HType.support,lv:1,hp:115,mp:145,def:10,ap:8,dis:380,speed:105,skills:[6002,6001],
buff:[],tal:[],info:"后勤保障,后勤型辅助"},
// 1. 基础近战型
5201:{uuid:5201,name:"兽人战士",path:"mo1", fac:FacSet.MON, kind:1,as:3.0,
type:HType.warrior,lv:1,hp:40,mp:100,def:0,ap:5,dis:60,speed:180,skills:[6201],
buff:[],tal:[],info:"标准炮灰确保英雄能完成3次普攻积累天赋计数"},
// 2. 快速突击型
5301:{uuid:5301,name:"兽人斥候",path:"mo1", fac:FacSet.MON, kind:1,as:1.2,
type:HType.assassin,lv:1,hp:30,mp:100,def:0,ap:12,dis:50,speed:400,skills:[6201],
buff:[],tal:[],info:"快速突击:极高移速贴脸,检测护盾(7102)刷新率"},
// 3. 重型坦克型
5401:{uuid:5401,name:"兽人卫士",path:"mo1", fac:FacSet.MON, kind:1,as:5.0,
type:HType.warrior,lv:1,hp:400,mp:100,def:5,ap:25,dis:90,speed:60,skills:[6005],
buff:[],tal:[],info:"重型坦克:数值墙,检测玩家破甲(7008)与持续输出"},
// 4. 远程骚扰型
5501:{uuid:5501,name:"兽人射手",path:"mo1", fac:FacSet.MON, kind:1,as:3.0,
type:HType.remote,lv:1,hp:50,mp:100,def:0,ap:15,dis:800,speed:90,skills:[6203],
buff:[],tal:[],info:"远程骚扰:跨屏打击,迫使阵地分散或移动英雄"},
// 5. 特殊机制型
5601:{uuid:5601,name:"兽人自爆兵",path:"mo1", fac:FacSet.MON, kind:1,as:3.0,
type:HType.assassin,lv:1,hp:60,mp:100,def:0,ap:250,dis:50,speed:220,skills:[6201],
buff:[],tal:[],info:"特殊机制:极端伤害,漏怪即秒杀,检测减伤(7103)"},
// 召唤师:持续召唤小怪(后续可在技能系统中实现 SType.zhaohuan
5602:{uuid:5602,name:"兽人召唤师",path:"mo1", fac:FacSet.MON, kind:1,as:3.0,
type:HType.mage,lv:1,hp:120,mp:300,def:5,ap:8,dis:380,speed:100,skills:[6005],
buff:[],tal:[],info:"战术目标:持续召唤小怪,检测英雄大招清场频率"},
// 治疗者:为周围怪物回血(此处以提升治疗效果和生命回复为基础被动)
5603:{uuid:5603,name:"兽人祭司",path:"mo1", fac:FacSet.MON, kind:1,as:3.0,
type:HType.support,lv:1,hp:120,mp:300,def:5,ap:6,dis:90,speed:105,skills:[6005],
buff:[],tal:[],info:"战术目标:为怪群回血,检测玩家沉默(7006)覆盖率"},
// 光环怪为周围怪物提供增益此处以Buff效果提升与移动速度提升为基础被动
// Attrs.BUFF_UP=60 (RATIO=1)Attrs.SPEED=63 (RATIO=1)
5604:{uuid:5604,name:"兽人图腾师",path:"mo1", fac:FacSet.MON, kind:1,as:3.0,
type:HType.support,lv:1,hp:100,mp:250,def:5,ap:7,dis:90,speed:110,skills:[6005],
buff:[],tal:[],info:"战术目标:提供加速光环,改变怪群推进节奏"},
// 6. 精英/BOSS型
5701:{uuid:5701,name:"兽人首领(BOSS)",path:"mo1", fac:FacSet.MON, kind:1,as:2.5,
type:HType.warrior,lv:3,hp:25000,mp:500,def:20,ap:80,dis:120,speed:120,skills:[6005],
buff:[],tal:[],info:"终极考验极高HP检测大招重置与辐射协同输出"},
};