refactor(SkillSet): 移除rangeType字段并使用SkillDisVal计算技能距离

修改SkillConfig接口和SkillSet配置,删除冗余的rangeType字段,直接使用SkillDisVal[SkillRange]计算技能距离,保持配置简洁性
This commit is contained in:
panw
2026-01-15 16:30:42 +08:00
parent 6cf69b33c8
commit 4147f18c5b

View File

@@ -181,8 +181,7 @@ export interface SkillConfig {
hitcd:number, // 持续伤害的伤害间隔(秒)
speed:number, // 移动速度
with:number, // 宽度(暂时无用)
dis:Number, // 距离/范围
rangeType?: SkillRange, // [新增] 距离类型标记用于AI辅助判断
dis:number, // 距离/范围(可选若不填则根据rangeType获取默认值)
ready:number, // 前摇时间
EAnm:number, // 结束动画ID
DAnm:number, // 命中后动画ID
@@ -196,8 +195,7 @@ export interface SkillConfig {
export const SkillSet: Record<number, SkillConfig> = {
5000:{uuid:5000,name:"反伤",sp_name:"thorns",icon:"1168",TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,
ap:0,cd:60,t_num:1,hit_num:1,hit:1,hitcd:0.2,speed:720,with:0,dis:800,
rangeType: SkillRange.Long,
ap:0,cd:60,t_num:1,hit_num:1,hit:1,hitcd:0.2,speed:720,with:0,dis:SkillDisVal[SkillRange.Long],
ready:0,EAnm:0,DAnm:9001,RType:RType.fixed,EType:EType.animationEnd,
buffs:[],neAttrs:[],info:"反伤",
},
@@ -205,28 +203,24 @@ export const SkillSet: Record<number, SkillConfig> = {
6001: {
uuid:6001,name:"近战攻击",sp_name:"atk_s1",icon:"1026",TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,
ap:100,cd:1,t_num:1,hit_num:1,hit:1,hitcd:0.2,speed:720,with:0,dis:SkillDisVal[SkillRange.Melee],
rangeType: SkillRange.Melee,
ready:0,EAnm:0,DAnm:9001,RType:RType.fixed,EType:EType.animationEnd,
buffs:[],neAttrs:[],info:"对前方目标造成100%攻击的伤害",
},
6002: {
uuid:6002,name:"远程攻击",sp_name:"b_arrow_blue",icon:"1135",TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,
ap:100,cd:1,t_num:1,hit_num:1,hit:1,hitcd:0.2,speed:720,with:0,dis:SkillDisVal[SkillRange.Melee],
rangeType: SkillRange.Melee,
ready:0,EAnm:0,DAnm:9001,RType:RType.fixed,EType:EType.animationEnd,
buffs:[],neAttrs:[],info:"对前方单个目标造成100%攻击的伤害",
},
6003: {
uuid:6003,name:"远程攻击",sp_name:"m_water_ball_1",icon:"1126",TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,
ap:100,cd:5,t_num:1,hit_num:1,hit:2,hitcd:0.3,speed:720,with:90,dis:SkillDisVal[SkillRange.Mid],
rangeType: SkillRange.Mid,
ready:8001,EAnm:0,DAnm:9001,RType:RType.linear,EType:EType.collision,
buffs:[],neAttrs:[],info:"对前方单个目标造成100%攻击的伤害",
},
6004: {
uuid:6004,name:"蓄力一击",sp_name:"atk_s4",icon:"1173",TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,
ap:100,cd:1,t_num:1,hit_num:1,hit:1,hitcd:0.2,speed:720,with:0,dis:SkillDisVal[SkillRange.Melee],
rangeType: SkillRange.Melee,
ready:0,EAnm:0,DAnm:9001,RType:RType.fixed,EType:EType.animationEnd,
buffs:[],neAttrs:[],info:"对前方目标造成150%攻击的伤害",
},
@@ -234,28 +228,24 @@ export const SkillSet: Record<number, SkillConfig> = {
6100: {
uuid:6100,name:"治疗",sp_name:"buff_wind",icon:"1292",TGroup:TGroup.Self,SType:SType.heal,act:"atk",DTType:DTType.single,
ap:30,cd:5,t_num:1,hit_num:1,hit:1,hitcd:0.2,speed:720,with:0,dis:SkillDisVal[SkillRange.Long],
rangeType: SkillRange.Long,
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:"1255",TGroup:TGroup.Self,SType:SType.shield,act:"atk",DTType:DTType.single,
ap:30,cd:7,t_num:1,hit_num:1,hit:1,hitcd:0.2,speed:720,with:0,dis:SkillDisVal[SkillRange.Long],
rangeType: SkillRange.Long,
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,
ap:30,cd:10,t_num:1,hit_num:1,hit:1,hitcd:0.2,speed:720,with:0,dis:SkillDisVal[SkillRange.Long],
rangeType: SkillRange.Long,
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,
ap:30,cd:10,t_num:3,hit_num:1,hit:1,hitcd:0.2,speed:720,with:0,dis:SkillDisVal[SkillRange.Long],
rangeType: SkillRange.Long,
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秒",
},
@@ -263,18 +253,14 @@ export const SkillSet: Record<number, SkillConfig> = {
6201: {
uuid:6201, name:"怪物近战", sp_name:"atk_s1", icon:"3036",
TGroup:TGroup.Enemy, SType:SType.damage, act:"atk", DTType:DTType.single,
ap:100, cd:1, t_num:1, hit_num:1, hit:1, hitcd:0.2, speed:0, with:0,
dis:50, // 怪物近战特殊距离
rangeType: SkillRange.Melee,
ap:100, cd:1, t_num:1, hit_num:1, hit:1, hitcd:0.2, speed:0, with:0, dis:SkillDisVal[SkillRange.Melee], // 怪物近战特殊距离
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,
ap:80, cd:2, t_num:1, hit_num:1, hit:1, hitcd:0.2, speed:800, with:0,
dis:600, // 怪物远程特殊距离
rangeType: SkillRange.Long,
ap:80, cd:2, t_num:1, hit_num:1, hit:1, hitcd:0.2, speed:800, with:0, dis:SkillDisVal[SkillRange.Long], // 怪物远程特殊距离
ready:0, EAnm:0, DAnm:9001, RType:RType.linear, EType:EType.collision,
buffs:[], neAttrs:[], info:"怪物基础远程攻击",
},