import { v3 } from "cc" import { FacSet } from "./BoxSet" import { smc } from "../SingletonModuleComp" import { BuffConf, DbuffConf, Attrs } from "./SkillSet" import { debuff } from "../../skills/debuff" 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, } 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,map:number, def:number, ap:number,dis:number, speed:number,lv:number,skills:number[], buff:BuffConf[], debuff:DbuffConf[], info:string } export const HeroInfo: Record = { // ========== 英雄角色 ========== // 刘邦 - 领导型战士(善于用人,知人善任) 5001:{uuid:5001,name:"刘邦",path:"hk1", fac:FacSet.HERO, kind:1, type:HType.warrior,lv:1,hp:120,mp:80,map:10,def:8,ap:15,dis:100,speed:120,skills:[6001,6005], buff:[],debuff:[],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,ap:20,dis:120,speed:180,skills:[6001,6005], buff:[],debuff:[],info:"战国刺客,高速度高暴击的敏捷型刺客"}, // 绿箭 - 远程射手(机动型,高移动速度和远程攻击) 5005:{uuid:5005,name:"绿箭",path:"ha1", fac:FacSet.HERO, kind:2, type:HType.remote,lv:1,hp:90,mp:70,map:8,def:4,ap:18,dis:450,speed:140,skills:[6001,6005], buff:[],debuff:[],info:"远程射手,机动型高远程输出"}, // 牧师 - 辅助治疗(辅助型,擅长治疗和支援) 5007:{uuid:5007,name:"牧师",path:"hh1", fac:FacSet.HERO, kind:2, type:HType.support,lv:1,hp:100,mp:120,map:12,def:5,ap:8,dis:350,speed:100,skills:[6001,6005], buff:[],debuff:[],info:"辅助治疗者,擅长治疗和支援队友"}, // 火女 - 元素法师(元素型,操控火焰元素) 5008:{uuid:5008,name:"火女",path:"hm1", fac:FacSet.HERO, kind:2, type:HType.mage,lv:1,hp:85,mp:150,map:25,def:3,ap:6,dis:400,speed:90,skills:[6001,6005], buff:[],debuff:[],info:"元素法师,操控火焰元素进行高魔法输出"}, // 魔法精灵 - 奥术法师(博学型,掌握多种魔法) 5009:{uuid:5009,name:"魔法精灵",path:"hm2", fac:FacSet.HERO, kind:2, type:HType.mage,lv:1,hp:80,mp:160,map:28,def:2,ap:5,dis:420,speed:95,skills:[6001,6005], buff:[],debuff:[],info:"奥术法师,博学多才掌握多种魔法"}, // 德鲁伊 - 自然辅助(辅助型,自然魔法和召唤) 5010:{uuid:5010,name:"德鲁伊",path:"hz1", fac:FacSet.HERO, kind:2, type:HType.support,lv:1,hp:95,mp:130,map:18,def:6,ap:10,dis:380,speed:105,skills:[6001,6005], buff:[],debuff:[],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,ap:5,dis:90,speed:100,skills:[6005], buff:[],debuff:[],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,ap:5,dis:350,speed:100,skills:[6005], buff:[],debuff:[],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,ap:5,dis:90,speed:100,skills:[6005], buff:[],debuff:[],info:"普通怪物-战士型"}, };