Files
heros/assets/script/game/common/config/heroSet.ts
panw b765e6a7a6 fix(heroSet): 为英雄配置添加天赋信息
- 刘邦添加天赋数组[7101,7201,7301]
- 荆轲天赋设置为[7201]
- 赵武灵王新增天赋[7002]
- 张良添加天赋[7004]
- 屈原配置天赋为[7101]
- 孙膑加入天赋[7202]
- 萧何设置天赋[7006]
2025-10-28 11:15:57 +08:00

152 lines
5.4 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 { FacSet } from "./BoxSet"
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,100,0)},
1:{pos:v3(0,100,0)},
2:{pos:v3(0,100,0)},
}
export const MonSet = {
0:{pos:v3(240,100,0)},
1:{pos:v3(320,100,0)},
2:{pos:v3(360,100,0)},
3:{pos:v3(400,100,0)},
4:{pos:v3(440,100,0)},
5:{pos:v3(480,100,0)},
6:{pos:v3(520,100,0)},
7:{pos:v3(560,100,0)},
}
export enum HeroConf{
COST=1500,
MAX_HP=200,
MAX_MP=200,
MAX_AP=20,
MAX_MAP=20,
MAX_DEF=20,
MAX_MDEF=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 map=HeroInfo[uuid].map/HeroConf.MAX_MAP
let def=HeroInfo[uuid].def/HeroConf.MAX_DEF
let mdef=HeroInfo[uuid].mdef/HeroConf.MAX_MDEF
return {hp:hp,mp:mp,ap:ap,map:map,def:def,mdef:mdef}
}
export enum HeroUpSet {
MP=5,
HP=10,
LVMP=100,
LVHP=100,
LVATK=10,
LVDEF=5,
}
export interface heroInfo{
uuid:number, name:string, path:string,fac:FacSet,kind:number,type:HType,
hp:number,mp:number, ap:number,map:number, def:number,mdef:number,dis:number, speed:number,lv:number,skills:number[],
buff:BuffConf[], tal:number[], info:string
}
export const HeroInfo: Record<number, heroInfo> = {
// ========== 英雄角色 ==========
// 刘邦 - 领导型战士(善于用人,知人善任)
5001:{uuid:5001,name:"刘邦",path:"hk1", fac:FacSet.HERO, kind:1,
type:HType.warrior,lv:1,hp:125,mp:85,map:10,def:9,mdef:0,ap:15,dis:100,speed:120,skills:[6001,6005],
buff:[],tal:[7101,7201,7301],info:"楚汉争霸领袖,领导统御型战士"},
// 荆轲 - 刺客(敏捷型,高速度和暴击率)
5002:{uuid:5002,name:"荆轲",path:"hc1", fac:FacSet.HERO, kind:1,
type:HType.assassin,lv:1,hp:80,mp:60,map:5,def:3,mdef:0,ap:22,dis:120,speed:180,skills:[6001,6005],
buff:[],tal:[7201],info:"战国刺客,刺杀专精敏捷型刺客"},
// 赵武灵王 - 远程射手(胡服骑射,机动型高移动速度和远程攻击)
5005:{uuid:5005,name:"赵武灵王",path:"ha1", fac:FacSet.HERO, kind:2,
type:HType.remote,lv:1,hp:100,mp:80,map:8,def:6,mdef:0,ap:18,dis:450,speed:140,skills:[6001,6005],
buff:[],tal:[7002],info:"胡服骑射改革者,机动型高远程输出"},
// 张良 - 智谋法师(运筹帷幄,智谋型法师)
5007:{uuid:5007,name:"张良",path:"hh1", fac:FacSet.HERO, kind:2,
type:HType.mage,lv:1,hp:88,mp:135,map:12,def:5,mdef:0,ap:15,dis:350,speed:100,skills:[6001,6005],
buff:[],tal:[7004],info:"运筹帷幄谋士,智谋型法师"},
// 屈原 - 元素法师(离骚诗韵,元素型高魔法输出)
5008:{uuid:5008,name:"屈原",path:"hm1", fac:FacSet.HERO, kind:2,
type:HType.mage,lv:1,hp:85,mp:140,map:25,def:4,mdef:0,ap:16,dis:400,speed:90,skills:[6001,6005],
buff:[],tal:[7101],info:"离骚诗韵,元素型高魔法输出"},
// 孙膑 - 谋略法师(兵法谋略,谋略型法师)
5009:{uuid:5009,name:"孙膑",path:"hm2", fac:FacSet.HERO, kind:2,
type:HType.mage,lv:1,hp:92,mp:135,map:28,def:6,mdef:0,ap:14,dis:420,speed:95,skills:[6001,6005],
buff:[],tal:[7202],info:"兵法谋略,谋略型法师"},
// 萧何 - 后勤辅助(后勤保障,后勤型辅助)
5010:{uuid:5010,name:"萧何",path:"hz1", fac:FacSet.HERO, kind:2,
type:HType.support,lv:1,hp:115,mp:145,map:18,def:10,mdef:0,ap:8,dis:380,speed:105,skills:[6001,6005],
buff:[],tal:[7006],info:"后勤保障,后勤型辅助"},
//怪物
5201:{uuid:5201,name:"兽人战士",path:"mo1", fac:FacSet.MON, kind:1,
type:HType.warrior,lv:1,hp:25,mp:100,map:10,def:5,mdef:0,ap:5,dis:90,speed:100,skills:[6005],
buff:[],tal:[],info:"普通怪物-战士型"},
5202:{uuid:5202,name:"兽人刺客",path:"mo1", fac:FacSet.MON, kind:1,
type:HType.remote,lv:1,hp:20,mp:100,map:10,def:5,mdef:0,ap:5,dis:350,speed:100,skills:[6005],
buff:[],tal:[],info:"普通怪物-战士型"},
5203:{uuid:5203,name:"兽人护卫",path:"mo1", fac:FacSet.MON, kind:1,
type:HType.warrior,lv:1,hp:25,mp:100,map:10,def:5,mdef:0,ap:5,dis:90,speed:100,skills:[6005],
buff:[],tal:[],info:"普通怪物-战士型"},
};