Files
pixelheros/assets/script/game/common/config/heroSet.ts
walkpan 578cfaa241 feat(config): 为英雄和怪物配置添加卡片等级字段并调整属性
- 在 heroInfo 接口中添加 cards_lv 可选字段以支持卡片等级
- 更新所有英雄和怪物的配置,为其添加初始 cards_lv 值
- 根据新的属性基准调整部分英雄的攻击速度(as)和描述(info)
- 在注释中添加各职业在卡片等级1和英雄等级1时的属性基准说明
- 统一注释中的标点符号(逗号使用全角)
2026-03-20 20:32:34 +08:00

166 lines
7.9 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 { SkillSet } from "./SkillSet";
export enum HType {
Melee = 0,
Mid = 1,
Long = 2,
}
export const HTypeName ={
0:"近战",
1:"中程",
2:"远程",
}
export const HeroPos={
0:{pos:v3(-320,BoxSet.GAME_LINE,0)},
1:{pos:v3(0,BoxSet.GAME_LINE,0)},
2:{pos:v3(0,BoxSet.GAME_LINE,0)},
}
export const FormationPointX = {
[HType.Melee]: 0,
[HType.Mid]: 100,
[HType.Long]: 180,
} as const;
export const HeroDisVal: Record<HType.Melee | HType.Mid | HType.Long, number> = {
[HType.Melee]: 150,
[HType.Mid]: 400,
[HType.Long]: 720,
}
export const resolveFormationTargetX = (fac: FacSet, type: HType): number => {
const resolvedRangeType = type as HType.Melee | HType.Mid | HType.Long;
const side = fac === FacSet.MON ? 1 : -1;
return FormationPointX[resolvedRangeType] * side;
}
export enum MonStart {
SLINE_1=140, //上线y
SLINE_2=100, //下线y
SLINE_3=180, //下线y
SLINE_4=60, //y起始点
START_X=320, //x起始点
START_I=90, //x轴间隔
}
/**
* 英雄/怪物基础信息接口
*/
export interface heroInfo {
uuid: number; // 唯一标识英雄5000段,怪物5200段
name: string; // 显示名称
icon?: string; // 图标名称(对应美术资源名)
path: string; // 资源路径(对应美术资源名)
fac: FacSet; // 阵营FacSet.HERO 或 FacSet.MON
kind?: number; // 未使用
lv: number; // 英雄等级
cards_lv?: number; // 卡片等级
as: number; // 攻击间隔(越小越快)
ss:number; // 技能间隔
type: HType; // 攻击定位(近战/中程/远程)
hp: number; // 生命值上限
ap: number; // 攻击力
// dis: number; // 攻击距离(像素)
speed: number; // 移动速度(像素/秒)
skills: number[]; // 携带技能ID列表
info: string; // 描述文案
}
/*
*=============英雄配置列表================
* 英雄规则设定
* 设定中的英雄都是1级,最高可以升级到3级不在列表内提现,升级在游戏内进行)
* skills[0]是普通攻击技能
* skills[1]是等级1时的技能,skills[2]是等级2时的技能,skills[3]是等级3时的技能,最多3级
*
* 属性基准(cards_lv:1,lv:1) SPEED:120,AP:30 |HP:300|as:1
* 坦克(cards_lv:1,lv:1) SPEED:180,AP:25 |HP:450|as:0.75
* 近战dps(cards_lv:1,lv:1) SPEED:180,AP:50 |HP:250|as:1.1
* 远程dps(cards_lv:1,lv:1) SPEED:120,AP:60 |HP:150|as:1.3
*远程法dps(cards_lv:1,lv:1) SPEED:100,AP:60 |HP:150|as:1.4
* 远程辅助(cards_lv:1,lv:1) SPEED:100,AP:20 |HP:150|as:1
*/
export const HeroInfo: Record<number, heroInfo> = {
// ========== 近战英雄 ==========
5001:{uuid:5001,name:"盾战士",path:"hk1", fac:FacSet.HERO,cards_lv:1,lv:1,as:0.65,ss:5,type:HType.Melee,hp:300,ap:25,speed:120,
skills:[6001,6301,6311,6321],info:"近战,魔法盾 坦克"},
5002:{uuid:5002,name:"圣骑士",path:"", fac:FacSet.HERO,cards_lv:3,lv:1,as:1,ss:5,type:HType.Melee,hp:340,ap:22,speed:115,
skills:[6001,6305],info:"近战,群体护盾 坦克"},
5003:{uuid:5003,name:"风行剑士",path:"", fac:FacSet.HERO,cards_lv:2,lv:1,as:1,ss:5,type:HType.Melee,hp:210,ap:38,speed:170,
skills:[6001,6014],info:"近战,闪击 近战dps"},
5004:{uuid:5004,name:"刺客",path:"hc1", fac:FacSet.HERO,cards_lv:4,lv:1,as:1.1,ss:5,type:HType.Melee,hp:140,ap:50,speed:180,
skills:[6001,6104],info:"近战,火焰击 近战dps"},
// ========== 法师英雄 ==========
5101:{uuid:5101,name:"奥术法师",path:"hm2", fac:FacSet.HERO,cards_lv:1,lv:1,as:1.4,ss:5,type:HType.Long,hp:150,ap:40,speed:95,
skills:[6005,6012],info:"半月波,冰锥 远法dps"},
5102:{uuid:5012,name:"火焰法师",path:"hm1", fac:FacSet.HERO,cards_lv:2,lv:1,as:1,ss:5,type:HType.Long,hp:150,ap:45,speed:90,
skills:[6004,6013],info:"火击,火球 远法dps"},
5103:{uuid:5013,name:"冰法法师",path:"hz1", fac:FacSet.HERO,cards_lv:3,lv:1,as:1,ss:5,type:HType.Long,hp:200,ap:20,speed:105,
skills:[6003,6012],info:"冰击,冰锥 远法dps"},
5104:{uuid:5104,name:"寒霜术士",path:"", fac:FacSet.HERO,cards_lv:4,lv:1,as:1,ss:5,type:HType.Long,hp:160,ap:36,speed:105,
skills:[6012,6202],info:"冰锥,冰刺 远法dps"},
5105:{uuid:5105,name:"炎爆法师",path:"", fac:FacSet.HERO,cards_lv:5,lv:1,as:1,ss:5,type:HType.Long,hp:155,ap:42,speed:95,
skills:[6013,6201],info:"火球,陨石术 远法dps" },
// ========== 远程英雄 ==========
5201:{uuid:5201,name:"射手",path:"ha1", fac:FacSet.HERO,cards_lv:1,lv:1,as:1,ss:5,type:HType.Long,hp:180,ap:30,speed:140,
skills:[6002,6011],info:"普通射击,暴射 远dps"},
5202:{uuid:5202,name:"游侠",path:"", fac:FacSet.HERO,cards_lv:3,lv:1,as:1,ss:5,type:HType.Long,hp:170,ap:32,speed:145,
skills:[6011,6101],info:"暴射,光箭 远dps"},
// ========== 腐竹英雄 ==========
5301:{uuid:5301,name:"牧师",path:"hh1", fac:FacSet.HERO,cards_lv:1,lv:1,as:1,ss:5,type:HType.Long,hp:160,ap:25,speed:100,
skills:[6005,6302],info:"半月波,治疗 远辅助" },
5302:{uuid:5302,name:"战地医师",path:"", fac:FacSet.HERO,cards_lv:2,lv:1,as:1,ss:5,type:HType.Mid,hp:220,ap:24,speed:120,
skills:[6005,6304],info:"半月波,群体治疗 远辅助"},
5303:{uuid:5303,name:"守护祭司",path:"", fac:FacSet.HERO,cards_lv:4,lv:1,as:1,ss:5,type:HType.Mid,hp:240,ap:20,speed:110,
skills:[6005,6004],info:"半月波,单体攻击buff 远辅助"},
5304:{uuid:5304,name:"秘法贤者",path:"", fac:FacSet.HERO,cards_lv:6,lv:1,as:1,ss:5,type:HType.Long,hp:175,ap:34,speed:100,
skills:[6005,6105],info:"半月波,群体攻击buff 远辅助"},
/*
*=============怪物配置列表================
* 基础近战型(lv:1) SPEED:180 |AP:12 |HP:120|as:0.65
* 重型坦克型(lv:1) SPEED:120 |AP:30 |HP:350|as:2
* 远程dps(lv:1) SPEED:80 |AP:45 |HP:80|as:1.5
* 远程辅助(lv:1) SPEED:80 |AP:20 |HP:80|as:1
* 精英 (lv:1) SPEED:100 |AP:20 |HP:1500|as:1
*/
//============== 兽人系列 ===============
// 1. 基础近战型
6001:{uuid:6001,name:"兽人战士",path:"mo1", fac:FacSet.MON,cards_lv:1,lv:1,as:3.0,ss:10,type:HType.Melee,hp:60,ap:8,speed:180,skills:[6001,6003],info:""},
// 2. 快速突击型
6002:{uuid:6002,name:"兽人斥候",path:"mo1", fac:FacSet.MON,cards_lv:1,lv:1,as:1.2,ss:10,type:HType.Melee,hp:40,ap:12,speed:400,skills:[6001,6003],info:""},
// 3. 重型坦克型
6003:{uuid:6003,name:"兽人卫士",path:"mo3", fac:FacSet.MON,cards_lv:1,lv:1,as:5.0,ss:10,type:HType.Melee,hp:200,ap:15,speed:60,skills:[6001,6003],info:""},
// 4. 远程骚扰型
6004:{uuid:6004,name:"兽人射手",path:"mo1", fac:FacSet.MON,cards_lv:1,lv:1,as:3.0,ss:10,type:HType.Long,hp:50,ap:10,speed:90,skills:[6001,6003],info:""},
// 5. 特殊机制型
6005:{uuid:6005,name:"兽人自爆兵",path:"mo1", fac:FacSet.MON,cards_lv:1,lv:1,as:3.0,ss:10,type:HType.Melee,hp:80,ap:200,speed:220,skills:[6001,6003],info:""},
6006:{uuid:6006,name:"兽人召唤师",path:"mo1", fac:FacSet.MON,cards_lv:1,lv:1,as:3.0,ss:10,type:HType.Melee,hp:150,ap:10,speed:100,skills:[6001,6003],info:""},
6007:{uuid:6007,name:"兽人祭司",path:"mo1", fac:FacSet.MON,cards_lv:1,lv:1,as:3.0,ss:10,type:HType.Melee,hp:150,ap:10,speed:105,skills:[6001,6003],info:""},
6008:{uuid:6008,name:"兽人图腾师",path:"mo1", fac:FacSet.MON,cards_lv:1,lv:1,as:3.0,ss:10,type:HType.Melee,hp:150,ap:10,speed:110,skills:[6001,6003],info:""},
// 6. 精英/BOSS型
6009:{uuid:6009,name:"兽人首领(BOSS)",path:"mo4", fac:FacSet.MON,cards_lv:1,lv:1,as:2.5,ss:10,type:HType.Melee,hp:2000,ap:60,speed:120,skills:[6002,6004],info:""},
};