移除魔法攻击(MAP)、魔法防御(MDEF)、元素抗性等冗余属性 将伤害减免统一由DEF属性处理,重命名CRITICAL_RESIST为CRITICAL_RES 更新相关技能、天赋和怪物配置以适应新的属性系统 删除未使用的职业成长系数配置和基础属性映射逻辑
241 lines
8.7 KiB
TypeScript
241 lines
8.7 KiB
TypeScript
// ========== 从 HeroAttrs.ts 导入属性相关定义 ==========
|
|
import { Attrs, NeAttrs,BType, getAttrs, AttrsType, isRatioAttr } from "./HeroAttrs";
|
|
|
|
export enum HSSet {
|
|
atk = 0, // 普通攻击
|
|
skill = 1, // 一般技能
|
|
max = 2, // 必杀技
|
|
}
|
|
|
|
export enum TGroup {
|
|
Self = 0, // 自身
|
|
Ally = 1, // 所有敌人
|
|
Team = 2, // 所有友方
|
|
Enemy = 3, // 敌方单位
|
|
All = 4 // 所有单位
|
|
}
|
|
export enum TType {
|
|
/** 前排目标(最靠近敌方阵营的单位) */
|
|
Frontline = 1, // 最前排单位
|
|
/** 后排目标(离敌方阵营最远的单位) */
|
|
Backline = 2, // 最后排单位
|
|
/** 生命值最低的目标 */
|
|
LowestHP = 3, // 最低生命值
|
|
/** 生命值最高的目标 */
|
|
HighestHP = 4, // 最高生命值
|
|
/** 近战职业目标 */
|
|
Melee =5, // 近战职业
|
|
/** 远程职业目标 */
|
|
Ranged =6, // 远程职业
|
|
/** 辅助职业目标 */
|
|
SupportClass =7, // 辅助职业
|
|
/** 随机目标 */
|
|
Random =8 // 随机目标
|
|
}
|
|
|
|
export enum DTType {
|
|
single = 0,
|
|
range = 1,
|
|
}
|
|
|
|
|
|
export enum SType {
|
|
damage = 0,
|
|
heal = 1,
|
|
shield = 2,
|
|
atk_speed = 3,
|
|
power_up = 4,
|
|
ap_up = 5,
|
|
dod_up = 6,
|
|
crit_up = 7,
|
|
crit_dmg_up = 8,
|
|
wfuny_up = 9,
|
|
zhaohuan = 10,
|
|
buff = 11,
|
|
}
|
|
|
|
//受伤动画名称
|
|
export enum AtkedName {
|
|
atked = "atked",
|
|
ice = "atked_ice",
|
|
fire = "atked_fire",
|
|
wind = "atked_wind",
|
|
crit = "atked_crit",
|
|
}
|
|
|
|
|
|
export enum RType {
|
|
linear = 0, //直线
|
|
bezier = 1, //贝塞尔
|
|
fixed = 2, //固定起点
|
|
fixedEnd = 3, //固定终点
|
|
}
|
|
|
|
export enum EType {
|
|
animationEnd = 0,
|
|
timeEnd = 1,
|
|
distanceEnd = 2,
|
|
collision = 3,
|
|
countEnd = 4,
|
|
}
|
|
//debuff类型
|
|
|
|
|
|
/*
|
|
=== 技能配置系统使用说明 ===
|
|
|
|
1. 基础属性:
|
|
- uuid: 技能唯一ID
|
|
- name: 技能名称
|
|
- sp_name: 特效名称
|
|
- AtkedName: 攻击类型
|
|
- path: 图片资源路径
|
|
|
|
2. 目标和效果:
|
|
- TGroup: 目标群体 (敌方、友方等)
|
|
- SType: 技能类型 (伤害、治疗、护盾等)
|
|
|
|
3. 执行参数:
|
|
- act: 角色执行的动画
|
|
- DTType: 伤害类型 (单体、范围)
|
|
- EType: 结束条件
|
|
- fname: 特效文件名
|
|
- with: 暂时无用
|
|
|
|
4. 数值参数:
|
|
- ap: 攻击力百分比
|
|
- cd: 冷却时间
|
|
- hit_num: 范围攻击 伤害敌人数量
|
|
- t_num: 目标数量
|
|
- hit: 穿刺个数
|
|
- hitcd: 持续伤害的伤害间隔
|
|
- speed: 移动速度
|
|
- cost: 消耗值
|
|
*/
|
|
export enum DType {
|
|
ATK= 0, // 物理
|
|
ICE=1, // 冰元素
|
|
FIRE=2, // 火元素
|
|
WIND=3, // 风元素
|
|
}
|
|
export const HeroSkillList = [6001,6001,6001,6001,6001,6001]
|
|
|
|
// Debuff配置接口
|
|
|
|
export interface BuffConf {
|
|
buff:Attrs;
|
|
BType:BType
|
|
value:number; // 效果值
|
|
time:number; // 持续时间
|
|
chance:number; // 触发概率
|
|
}
|
|
export interface NeAttrsConf {
|
|
neAttrs:NeAttrs;
|
|
value:number;
|
|
time:number;
|
|
}
|
|
interface IReady {
|
|
uuid:number,
|
|
loop: boolean,
|
|
SkillTime: number,// 技能控制存续时间时间
|
|
ReadyTime: number,// 技能前摇时间
|
|
RType: number, //技能运行类型 0-线性 1-贝塞尔 2-开始位置固定 3-目标位置固定
|
|
ready_y: number,
|
|
path:string,
|
|
}
|
|
|
|
interface IEndAnm {
|
|
uuid:number,
|
|
path:string,
|
|
loop:boolean,
|
|
time:number,
|
|
}
|
|
// 技能配置接口 - 按照6001格式排列
|
|
export interface SkillConfig {
|
|
uuid:number,name:string,sp_name:string,icon:string,TGroup:TGroup,SType:SType,act:string,DTType:DTType,DType:DType,
|
|
ap:number,cd:number,t_num:number,hit_num:number,hit:number,hitcd:number,speed:number,cost:number,with:number,dis:Number,ready:number,EAnm:number,DAnm:number,RType:RType,EType:EType,
|
|
buffs:BuffConf[],neAttrs:NeAttrsConf[],info:string,hero?:number ,
|
|
}
|
|
|
|
export const SkillSet: Record<number, SkillConfig> = {
|
|
5000:{uuid:5000,name:"反伤",sp_name:"thorns",icon:"3036",TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,DType:DType.ATK,
|
|
ap:0,cd:60,t_num:1,hit_num:1,hit:1,hitcd:0.2,speed:720,cost:0,with:0,dis:80,
|
|
ready:0,EAnm:0,DAnm:9001,RType:RType.fixed,EType:EType.animationEnd,
|
|
buffs:[],neAttrs:[],info:"反伤",
|
|
},
|
|
// ========== 基础攻击 ========== 6001-6099
|
|
6001: {
|
|
uuid:6001,name:"挥击",sp_name:"atk_s1",icon:"3036",TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,DType:DType.ATK,
|
|
ap:100,cd:1,t_num:1,hit_num:1,hit:1,hitcd:0.2,speed:720,cost:10,with:0,dis:80,
|
|
ready:0,EAnm:0,DAnm:9001,RType:RType.fixed,EType:EType.animationEnd,
|
|
buffs:[],neAttrs:[],info:"向最前方敌人扔出石斧,造成100%攻击的伤害",
|
|
},
|
|
6002: {
|
|
uuid:6002,name:"挥砍",sp_name:"atk_s4",icon:"3036",TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,DType:DType.ATK,
|
|
ap:100,cd:1,t_num:1,hit_num:1,hit:1,hitcd:0.2,speed:720,cost:10,with:0,dis:80,
|
|
ready:0,EAnm:0,DAnm:9001,RType:RType.fixed,EType:EType.animationEnd,
|
|
buffs:[],neAttrs:[],info:"向最前方敌人扔出石斧,造成100%攻击的伤害",
|
|
},
|
|
6005: {
|
|
uuid:6005,name:"水球",sp_name:"m_water_ball_1",icon:"3039",TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,DType:DType.ICE,
|
|
ap:100,cd:5,t_num:1,hit_num:1,hit:2,hitcd:0.3,speed:720,cost:0,with:90,dis:360,
|
|
ready:8001,EAnm:0,DAnm:9001,RType:RType.linear,EType:EType.collision,
|
|
buffs:[],neAttrs:[],info:"召唤水球攻击前方敌人,造成100%魔法攻击的伤害",
|
|
},
|
|
// ========== 基础buff ========== 6100-6199
|
|
6100: {
|
|
uuid:6100,name:"治疗",sp_name:"buff_wind",icon:"3036",TGroup:TGroup.Self,SType:SType.heal,act:"atk",DTType:DTType.single,DType:DType.ATK,
|
|
ap:30,cd:5,t_num:1,hit_num:1,hit:1,hitcd:0.2,speed:720,cost:10,with:0,dis:720,
|
|
ready:0,EAnm:0,DAnm:9001,RType:RType.fixed,EType:EType.animationEnd,
|
|
buffs:[],neAttrs:[],info:"治疗自己,回复30%最大生命值",
|
|
},
|
|
6101:{
|
|
uuid:6101,name:"魔法盾",sp_name:"buff_wind",icon:"3036",TGroup:TGroup.Self,SType:SType.shield,act:"atk",DTType:DTType.single,DType:DType.WIND,
|
|
ap:30,cd:7,t_num:1,hit_num:1,hit:1,hitcd:0.2,speed:720,cost:10,with:0,dis:720,
|
|
ready:0,EAnm:0,DAnm:9001,RType:RType.fixed,EType:EType.animationEnd,
|
|
buffs:[],neAttrs:[],info:"获得30%最大生命值的护盾,持续60秒",
|
|
},
|
|
6102:{
|
|
uuid:6102,name:"强壮",sp_name:"buff_wind",icon:"3036",TGroup:TGroup.Team,SType:SType.buff,act:"atk",DTType:DTType.single,DType:DType.WIND,
|
|
ap:30,cd:10,t_num:1,hit_num:1,hit:1,hitcd:0.2,speed:720,cost:10,with:0,dis:720,
|
|
ready:0,EAnm:0,DAnm:9001,RType:RType.fixed,EType:EType.animationEnd,
|
|
buffs:[{buff:Attrs.AP,BType:BType.VALUE,value:10,time:30,chance:1}],neAttrs:[],info:"增加目标10%攻击力,持续30秒",
|
|
},
|
|
6103:{
|
|
uuid:6103,name:"群体强壮",sp_name:"buff_wind",icon:"3036",TGroup:TGroup.Team,SType:SType.buff,act:"atk",DTType:DTType.range,DType:DType.WIND,
|
|
ap:30,cd:10,t_num:3,hit_num:1,hit:1,hitcd:0.2,speed:720,cost:10,with:0,dis:720,
|
|
ready:0,EAnm:0,DAnm:9001,RType:RType.fixed,EType:EType.animationEnd,
|
|
buffs:[{buff:Attrs.AP,BType:BType.RATIO,value:10,time:30,chance:1}],neAttrs:[],info:"增加目标10%攻击力,持续30秒",
|
|
},
|
|
// ========== 怪物基础技能 ========== 6200-6299
|
|
6201: {
|
|
uuid:6201, name:"怪物近战", sp_name:"atk_s1", icon:"3036",
|
|
TGroup:TGroup.Enemy, SType:SType.damage, act:"atk", DTType:DTType.single, DType:DType.ATK,
|
|
ap:100, cd:1, t_num:1, hit_num:1, hit:1, hitcd:0.2, speed:0, cost:0, with:0,
|
|
dis:50, // 近战距离
|
|
ready:0, EAnm:0, DAnm:9001, RType:RType.fixed, EType:EType.animationEnd,
|
|
buffs:[], neAttrs:[], info:"怪物基础近战攻击",
|
|
},
|
|
6203: {
|
|
uuid:6203, name:"怪物射击", sp_name:"arrow_1", icon:"3039",
|
|
TGroup:TGroup.Enemy, SType:SType.damage, act:"atk", DTType:DTType.single, DType:DType.ATK,
|
|
ap:80, cd:2, t_num:1, hit_num:1, hit:1, hitcd:0.2, speed:800, cost:0, with:0,
|
|
dis:600, // 远程距离
|
|
ready:0, EAnm:0, DAnm:9001, RType:RType.linear, EType:EType.collision,
|
|
buffs:[], neAttrs:[], info:"怪物基础远程攻击",
|
|
},
|
|
|
|
};
|
|
|
|
export const SkillReadyConf: Record<number, IReady> = {
|
|
0:{uuid:0,loop:false,SkillTime:0,ReadyTime:0,RType:0,ready_y:0,path:""}, // 无前摇
|
|
8001:{uuid:8001,loop:false,SkillTime:0,ReadyTime:0,RType:0,ready_y:0,path:"fire1"},
|
|
};
|
|
|
|
//技能结束动画EAnm 和集中后动画DAnm, 共用设定数组
|
|
export const EAnmConf: Record<number, IEndAnm> = {
|
|
0:{uuid:0,path:"",loop:false,time:0}, // 无结束动画
|
|
9001:{uuid:9001,path:"atked",loop:false,time:0},
|
|
};
|
|
|
|
|