291 lines
17 KiB
TypeScript
291 lines
17 KiB
TypeScript
import { log } from "cc"
|
||
|
||
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 skRun {
|
||
runing = 0,
|
||
dead = 1,
|
||
}
|
||
|
||
//技能释放cd: 0:技能配置的cd,1:HeroViewComp.cd 值,2:HeroViewComp.pw:0值,当HeroViewComppw==HeroViewComp.pwm值是 释放
|
||
export enum CdType {
|
||
SkillCD = 0, // 使用技能配置的cd
|
||
HeroCD = 1, // 使用英雄公共CD
|
||
HeroPower = 2, // 能量型技能(需满能量)
|
||
AtkCount = 3, // 攻击次数触发
|
||
BeAtkCount = 4, // 被攻击次数触发
|
||
}
|
||
|
||
|
||
//技能释放cd: 0:技能配置的cd,1:HeroViewComp.cd 值,2:HeroViewComp.pw:0值,当HeroViewComppw==HeroViewComp.pwm值是 释放
|
||
export enum AType {
|
||
linear = 0, // 直线
|
||
parabolic = 1, // 抛射物
|
||
fixedStart = 2, // 固定在出发点
|
||
fixedEnd = 3, // 固定在终点
|
||
}
|
||
|
||
export enum RType {
|
||
linear = 0, //直线
|
||
bezier = 1, //贝塞尔
|
||
fixed = 2, //固定
|
||
}
|
||
|
||
export enum EType {
|
||
animationEnd = 0,
|
||
timeEnd = 1,
|
||
distanceEnd = 2,
|
||
collision = 3,
|
||
countEnd = 4,
|
||
}
|
||
//debuff类型
|
||
export enum DebuffAttr {
|
||
STUN = 1, //眩晕
|
||
SLOW = 2, //减速
|
||
FROST = 3, //冰冻
|
||
BURN = 4, //易伤
|
||
DECD = 5, //减cd
|
||
DEHP = 6, //减hp
|
||
DEATK = 7, //减atk
|
||
DECOUNT = 8, //减攻击次数
|
||
BACK = 9, //击退
|
||
CRITICAL = 10, //自身暴击率降低
|
||
DODGE = 11, //闪避
|
||
}
|
||
|
||
//buff类型
|
||
export enum BuffAttr {
|
||
ATK = 1, // 攻击力
|
||
WFUNY = 2, // 风怒
|
||
ATK_CD = 3, // 攻击速度
|
||
HP = 4, // 生命值
|
||
DEF = 5, // 免伤
|
||
SKILL_DMG = 6, // 技能效果
|
||
SKILL_CD = 7, // 技能冷却缩减
|
||
CARD_EFFECT = 8, // 卡牌效果
|
||
CARD_COUNT = 8, // 卡牌起效次数,每3次多起效一次
|
||
CRITICAL = 9, //暴击率
|
||
CRITICAL_DMG = 10, //暴击伤害
|
||
CRITICAL_NO = 11, //暴击免疫
|
||
DODGE = 12, //闪避
|
||
DODGE_NO = 13, //闪避免疫
|
||
DEBUFF_COUNT = 14, //debuff次数
|
||
DEBUFF_VALUE = 15, //debuff效果
|
||
DEBUFF_UP = 16, //debuff概率提升
|
||
DEBUFF_DOWN = 17, //被debuff概率降低
|
||
PUNCTURE = 18, //穿刺敌人伤害后方敌人
|
||
PUNCTURE_DMG = 19, //穿刺敌人伤害后方敌人伤害加成
|
||
FROST_RATIO = 20, //冰冻比率
|
||
REFLECT = 21, //反伤比率
|
||
KNOCKBACK = 22, //击退概率
|
||
BURN_COUNT = 23, //易伤额外次数
|
||
}
|
||
|
||
export const geDebuffNum=()=>{
|
||
return {
|
||
STUN:0, //眩晕
|
||
SLOW:0, //减速
|
||
FROST:0, //冰冻
|
||
BURN:0, //易伤
|
||
DECD:0, //减cd
|
||
DEHP:0, //减hp
|
||
DEATK:0, //减atk
|
||
DECOUNT:0, //减攻击次数
|
||
CRITICAL:0, //暴击
|
||
DODGE:0, //闪避
|
||
|
||
}
|
||
}
|
||
|
||
|
||
export const getBuffNum=()=>{
|
||
return {
|
||
ATK:0, // 攻击力
|
||
WFUNY:0, // 风怒概率
|
||
ATK_CD:0, // 攻击速度
|
||
HP:0, // 生命值
|
||
DEF:0, // 免伤
|
||
SKILL_DMG:0, // 技能效果
|
||
SKILL_CD:0, // 技能冷却缩减
|
||
CARD_EFFECT:0, // 卡牌效果
|
||
CARD_COUNT:0, // 卡牌起效次数,每3次多起效一次
|
||
CRITICAL:0, //暴击
|
||
CRITICAL_DMG:0, //暴击伤害
|
||
CRITICAL_NO:0, //暴击免疫
|
||
DODGE:0, //闪避
|
||
DODGE_NO:0, //闪避免疫
|
||
DEBUFF_COUNT:0, //debuff次数
|
||
DEBUFF_VALUE:0, //debuff效果
|
||
DEBUFF_UP:0, //debuff概率提升
|
||
DEBUFF_DOWN:0, //被debuff概率降低
|
||
PUNCTURE:0, //穿刺敌人伤害后方敌人
|
||
PUNCTURE_DMG:0, //穿刺敌人伤害后方敌人伤害加成
|
||
FROST_RATIO:0, //冰冻比率
|
||
REFLECT:0, //反伤比率
|
||
KNOCKBACK:0, //击退概率
|
||
BURN_COUNT:0, //易伤额外次数
|
||
}
|
||
}
|
||
|
||
export enum Quality{
|
||
WHITE=1,
|
||
GREEN=2,
|
||
BLUE=3,
|
||
PURPLE=4,
|
||
ORANGE=5,
|
||
}
|
||
/*
|
||
path: 图片地址
|
||
[debuff] : 0:无,1:冰,2:灼烧,3:眩晕,4:降低攻击,5:降低hp,6:降低防御,7:吸血,8:击退
|
||
depb:触发比率
|
||
debtime :持续时间
|
||
derate:伤害比率
|
||
deV:0,deC:0,deR:100,in:持续时间
|
||
count:触发次数
|
||
def:增加防御比例
|
||
apup:增加攻击比例
|
||
ap:施法者攻击
|
||
mhp:增加最大生命比例
|
||
hp:增加当前生命比例
|
||
cd:buff/debuff持续时间
|
||
/debhit:1,hited:伤害时间
|
||
shield:增加护盾占最大生命比例
|
||
speed:移动速度
|
||
sonsk:子技能id
|
||
hero:召唤物英雄id
|
||
cost:10,info:技能描述
|
||
debuff 按次数进行结算,在多次生效内,有一定的叠加,debuff.deC为次数,debuff.deV为效果
|
||
*/
|
||
export const HeroSkillList = [6001,6001,6001,6001,6001,6001]
|
||
export const getSkills=(quality:number)=>{
|
||
const heroSkills: number[] = [];
|
||
|
||
// 遍历所有技能,找出 for_hero 为 true 且品质匹配的技能
|
||
Object.values(SkillSet).forEach(skill => {
|
||
// 检查技能是否有 for_hero 属性且为 true,同时品质匹配
|
||
if (skill.for_hero === true && skill.quality === quality) {
|
||
heroSkills.push(skill.uuid);
|
||
}
|
||
});
|
||
console.log("[SkillSet]:getSkills",heroSkills)
|
||
return heroSkills;
|
||
}
|
||
export const SkillSet = {
|
||
6001:{uuid:6001,name:"凛冬之触",for_hero:false,sp_name:"greenball",path:"6001",quality:Quality.WHITE, TType:TType.Frontline,
|
||
TGroup:TGroup.Enemy,act:"atk",CdType:1,AType:AType.linear,RType:RType.linear,EType:EType.collision,fname:"max",flash:false,with:90,
|
||
debuff:0,deV:0,deC:0,deR:100,in:0.8,ap:100,cd:5,hit:1,hited:0.3,shield:0,speed:720,sonsk:0,hero:0,cost:10,info:"向最前方敌人释放寒冰弹,造成100%攻击的伤害"},
|
||
|
||
6002:{uuid:6002,name:"穿心箭矢",for_hero:false,sp_name:"arrow",path:"6006",quality:Quality.WHITE, TType:TType.Frontline,
|
||
TGroup:TGroup.Enemy,act:"atk",CdType:1,AType:AType.parabolic,RType:RType.linear,EType:EType.collision,fname:"max",flash:false,with:90,
|
||
debuff:0,deV:0,deC:0,deR:100,in:0.8,ap:100,cd:5,hit:1,hited:0.3,shield:0,speed:720,sonsk:0,hero:0,cost:10,info:"向最前方敌人释放箭矢,造成100%攻击的伤害"},
|
||
|
||
6003:{uuid:6003,name:"神圣护盾",for_hero:false,sp_name:"shield",path:"6018",quality:Quality.WHITE, TType:TType.Frontline,
|
||
TGroup:TGroup.Self,act:"max",CdType:2,AType:AType.linear,RType:RType.linear,EType:EType.animationEnd,fname:"max",flash:false,with:90,
|
||
debuff:0,deV:0,deC:0,deR:100,in:0.8,ap:100,cd:5,hit:1,hited:0.3,shield:30,speed:720,sonsk:0,hero:0,cost:10,info:"召唤圣盾保护自己,可以抵御3次攻击"},
|
||
|
||
6004:{uuid:6004,name:"自愈", for_hero:false, sp_name:"heath_small",path:"6032",quality:Quality.WHITE, TType:TType.Frontline,
|
||
TGroup:TGroup.Self,act:"max",CdType:2,AType:AType.linear,RType:RType.linear,EType:EType.animationEnd,fname:"max",flash:false,with:90,
|
||
debuff:0,deV:0,deC:0,deR:100,in:2,ap:100,cd:5,hit:1,hited:0.3,shield:0,speed:720,sonsk:0,hero:0,cost:10,info:"主动:自己回复自身5%最大生命值的生命"},
|
||
|
||
6005:{uuid:6005,name:"基础打击",for_hero:false,sp_name:"base1",path:"6007",quality:Quality.WHITE, TType:TType.Frontline,
|
||
TGroup:TGroup.Enemy,act:"atk",CdType:1,AType:AType.linear,RType:RType.linear,EType:EType.collision,fname:"max",flash:false,with:90,
|
||
debuff:0,deV:0,deC:0,deR:100,in:0.8,ap:100,cd:5,hit:1,hited:0.3,shield:0,speed:720,sonsk:0,hero:0,cost:10,info:"向最前方敌人扔出铁斧,造成100%攻击的伤害"},
|
||
6006:{uuid:6006,name:"基础打击",for_hero:false,sp_name:"base2",path:"6007",quality:Quality.WHITE, TType:TType.Frontline,
|
||
TGroup:TGroup.Enemy,act:"atk",CdType:1,AType:AType.linear,RType:RType.linear,EType:EType.collision,fname:"max",flash:false,with:90,
|
||
debuff:0,deV:0,deC:0,deR:100,in:0.8,ap:100,cd:5,hit:1,hited:0.3,shield:0,speed:720,sonsk:0,hero:0,cost:10,info:"向最前方敌人扔出铁斧,造成100%攻击的伤害"},
|
||
6007:{uuid:6007,name:"基础打击",for_hero:false,sp_name:"base3",path:"6007",quality:Quality.WHITE, TType:TType.Frontline,
|
||
TGroup:TGroup.Enemy,act:"atk",CdType:1,AType:AType.linear,RType:RType.linear,EType:EType.collision,fname:"max",flash:false,with:90,
|
||
debuff:0,deV:0,deC:0,deR:100,in:0.8,ap:100,cd:5,hit:1,hited:0.3,shield:0,speed:720,sonsk:0,hero:0,cost:10,info:"向最前方敌人扔出铁斧,造成100%攻击的伤害"},
|
||
6008:{uuid:6008,name:"基础打击",for_hero:false,sp_name:"base4",path:"6007",quality:Quality.WHITE, TType:TType.Frontline,
|
||
TGroup:TGroup.Enemy,act:"atk",CdType:1,AType:AType.linear,RType:RType.linear,EType:EType.collision,fname:"max",flash:false,with:90,
|
||
debuff:0,deV:0,deC:0,deR:100,in:0.8,ap:100,cd:5,hit:1,hited:0.3,shield:0,speed:720,sonsk:0,hero:0,cost:10,info:"向最前方敌人扔出铁斧,造成100%攻击的伤害"},
|
||
|
||
6009:{uuid:6009,name:"铁斧打击",for_hero:false,sp_name:"base_ft",path:"6007",quality:Quality.WHITE, TType:TType.Frontline,
|
||
TGroup:TGroup.Enemy,act:"atk",CdType:1,AType:AType.linear,RType:RType.linear,EType:EType.collision,fname:"max",flash:false,with:90,
|
||
debuff:0,deV:0,deC:0,deR:100,in:0.8,ap:100,cd:5,hit:1,hited:0.3,shield:0,speed:720,sonsk:0,hero:0,cost:10,info:"向最前方敌人扔出铁斧,造成100%攻击的伤害"},
|
||
6010:{uuid:6010,name:"木棍打击",for_hero:false,sp_name:"base_mg",path:"6008",quality:Quality.WHITE, TType:TType.Frontline,
|
||
TGroup:TGroup.Enemy,act:"atk",CdType:1,AType:AType.linear,RType:RType.linear,EType:EType.collision,fname:"max",flash:false,with:90,
|
||
debuff:0,deV:0,deC:0,deR:100,in:0.8,ap:100,cd:5,hit:1,hited:0.3,shield:0,speed:720,sonsk:0,hero:0,cost:10,info:"向最前方敌人扔出木棍,造成100%攻击的伤害"},
|
||
6011:{uuid:6011,name:"飞刀打击",for_hero:false,sp_name:"mon_xd",path:"6009",quality:Quality.WHITE, TType:TType.Frontline,
|
||
TGroup:TGroup.Enemy,act:"atk",CdType:1,AType:AType.linear,RType:RType.linear,EType:EType.collision,fname:"max",flash:false,with:90,
|
||
debuff:0,deV:0,deC:0,deR:100,in:0.8,ap:100,cd:5,hit:1,hited:0.3,shield:0,speed:720,sonsk:0,hero:0,cost:10,info:"向最前方敌人扔出飞刀,造成100%攻击的伤害"},
|
||
6012:{uuid:6012,name:"石斧打击",for_hero:false,sp_name:"base_sf",path:"6010",quality:Quality.WHITE, TType:TType.Frontline,
|
||
TGroup:TGroup.Enemy,act:"atk",CdType:1,AType:AType.linear,RType:RType.linear,EType:EType.collision,fname:"max",flash:false,with:90,
|
||
debuff:0,deV:0,deC:0,deR:100,in:0.8,ap:100,cd:5,hit:1,hited:0.3,shield:0,speed:720,sonsk:0,hero:0,cost:10,info:"向最前方敌人扔出石斧,造成100%攻击的伤害"},
|
||
|
||
|
||
6022:{uuid:6022,name:"大火球" ,for_hero:true,sp_name:"fire",path:"6022",quality:Quality.GREEN, TType:TType.Frontline,
|
||
TGroup:TGroup.Enemy,act:"atk",CdType:2,AType:AType.linear,RType:RType.linear,EType:EType.collision,fname:"max",flash:false,with:90,
|
||
debuff:DebuffAttr.STUN,deV:20,deC:1,deR:100,in:1,ap:100,cd:5,hit:2,hited:0.3,shield:0,speed:720,sonsk:0,hero:0,cost:10,info:"召唤大火球攻击前方所有敌人,造成300%攻击的伤害,有一定几率施加灼烧"},
|
||
|
||
6023:{uuid:6023,name:"龙卷风",for_hero:true, sp_name:"bwind",path:"6026",quality:Quality.GREEN, TType:TType.Frontline,
|
||
TGroup:TGroup.Enemy,act:"max",CdType:2,AType:AType.linear,RType:RType.linear,EType:EType.collision,fname:"max",flash:false,with:90,
|
||
debuff:DebuffAttr.BACK,deV:0,deC:0,deR:100,in:3,ap:100,cd:5,hit:1,hited:1,shield:0,speed:360,sonsk:0,hero:0,cost:10,info:"召唤大火球攻击前方所有敌人,造成200%攻击的伤害,50%几率击退敌人"},
|
||
|
||
6024:{uuid:6024,name:"寒冰箭",for_hero:true, sp_name:"arrow_blue",path:"6024",quality:Quality.GREEN, TType:TType.Frontline,
|
||
TGroup:TGroup.Enemy,act:"atk",CdType:2,AType:AType.linear,RType:RType.linear,EType:EType.collision,fname:"max",flash:false,with:90,
|
||
debuff:DebuffAttr.FROST,deV:1,deC:0,deR:100,in:1,ap:100,cd:5,hit:1,hited:0.3,shield:0,speed:720,sonsk:0,hero:0,cost:10,info:"召唤大火球攻击前方所有敌人,造成200%攻击的伤害,20%几率冰冻敌人"},
|
||
|
||
6025:{uuid:6025,name:"烈焰射击",for_hero:false,sp_name:"arrow_yellow",path:"6025",quality:Quality.GREEN, TType:TType.Frontline,
|
||
TGroup:TGroup.Enemy,act:"atk",CdType:2,AType:AType.linear,RType:RType.linear,EType:EType.collision,fname:"max",flash:false,with:90,
|
||
debuff:DebuffAttr.STUN,deV:0,deC:0,deR:100,in:1,ap:100,cd:5,hit:1,hited:0.3,shield:0,speed:720,sonsk:0,hero:0,cost:10,info:"召唤大火球攻击前方所有敌人,造成200%攻击的伤害,20%几率眩晕敌人"},
|
||
|
||
6026:{uuid:6026,name:"火墙", for_hero:true, sp_name:"firewall",path:"6023",quality:Quality.BLUE, TType:TType.Frontline,
|
||
TGroup:TGroup.Ally,act:"max",CdType:2,AType:AType.fixedEnd,RType:RType.fixed,EType:EType.timeEnd,fname:"max",flash:false,with:90,
|
||
debuff:0,deV:0,deC:0,deR:100,in:10,ap:50,cd:5,hit:1,hited:0.3,shield:0,speed:720,sonsk:0,hero:0,cost:10,info:"在最前方敌人位置,召唤一堵火墙,持续10秒,每秒造成50%攻击伤害"},
|
||
|
||
6027:{uuid:6027,name:"冰刺",for_hero:true,sp_name:"icez",path:"6022",quality:Quality.BLUE, TType:TType.Frontline,
|
||
TGroup:TGroup.Ally,act:"max",CdType:2,AType:AType.fixedEnd,RType:RType.fixed,EType:EType.animationEnd,fname:"max",flash:false,with:90,
|
||
debuff:DebuffAttr.FROST,deV:0,deC:0,deR:100,in:1,ap:300,cd:5,hit:1,hited:0.3,shield:0,speed:720,sonsk:0,hero:0,cost:10,info:"在最前方敌人位置,召唤冰刺攻击敌人,造成200%攻击的伤害,20%几率冰冻敌人"},
|
||
|
||
6028:{uuid:6028,name:"潮汐", for_hero:true, sp_name:"watert",path:"6026",quality:Quality.PURPLE, TType:TType.Frontline,
|
||
TGroup:TGroup.Ally,act:"max",CdType:2,AType:AType.fixedEnd,RType:RType.fixed,EType:EType.animationEnd,fname:"max",flash:false,with:90,
|
||
debuff:DebuffAttr.BACK,deV:0,deC:0,deR:100,in:3,ap:100,cd:5,hit:1,hited:0.3,shield:0,speed:720,sonsk:0,hero:0,cost:10,info:"在最前方敌人位置,召唤水柱攻击敌人,每秒造成100%攻击的伤害,50%几率击退敌人"},
|
||
|
||
6029:{uuid:6029,name:"陨石术",for_hero:true, sp_name:"fireys",path:"6029",quality:Quality.PURPLE, TType:TType.Frontline,
|
||
TGroup:TGroup.Ally,act:"max",CdType:2,AType:AType.fixedEnd,RType:RType.fixed,EType:EType.animationEnd,fname:"max",flash:false,with:90,
|
||
debuff:0,deV:0,deC:0,deR:100,in:3,ap:500,cd:5,hit:1,hited:0.3,shield:0,speed:720,sonsk:0,hero:0,cost:10,info:"在最前方敌人位置,召唤陨石攻击敌人,造成500%攻击的伤害"},
|
||
|
||
|
||
6020:{uuid:6020,name:"冰暴",for_hero:true,sp_name:"bingyu",path:"6034",quality:Quality.PURPLE, TType:TType.Frontline,
|
||
TGroup:TGroup.Ally,act:"max",CdType:2,AType:AType.fixedEnd,RType:RType.fixed,EType:EType.timeEnd,fname:"max",flash:false,with:90,
|
||
debuff:4,deV:0,deC:0,deR:100,in:4,ap:80,cd:5,hit:1,hited:1,shield:0,speed:720,sonsk:0,hero:0,cost:10,info:"射出能量暴风箭攻击最前方范围敌人,每波造成80%攻击的伤害"},
|
||
|
||
6021:{uuid:6021,name:"烈火呼吸",for_hero:true,sp_name:"firequan",path:"6011",quality:Quality.BLUE, TType:TType.Frontline,
|
||
TGroup:TGroup.Ally,act:"max",CdType:2,AType:AType.linear,RType:RType.linear,EType:EType.timeEnd,fname:"max",flash:false,with:90,
|
||
debuff:0,deV:0,deC:0,deR:100,in:3,ap:100,cd:5,hit:1,hited:0.3,shield:0,speed:720,sonsk:0,hero:0,cost:10,info:"召唤烈焰攻击前方敌人,造成200%攻击的伤害,烈焰维持3秒"},
|
||
|
||
6030:{uuid:6030,name:"冰墙", for_hero:false, sp_name:"icet",path:"6023",quality:Quality.GREEN, TType:TType.Frontline,
|
||
TGroup:TGroup.Enemy,act:"max",CdType:2,AType:AType.linear,RType:RType.linear,EType:EType.animationEnd,fname:"max",flash:false,with:90,
|
||
debuff:DebuffAttr.BACK,deV:0,deC:0,deR:100,in:1,ap:400,cd:5,hit:1,hited:0.3,shield:0,speed:720,sonsk:0,hero:0,cost:10,info:"在最前方敌人位置,召唤冰墙攻击敌人,造成200%攻击的伤害,50%几率击退敌人"},
|
||
|
||
6031:{uuid:6031,name:"召唤仆从",for_hero:true,sp_name:"zhaohuan",path:"6031",quality:Quality.PURPLE, TType:TType.Frontline,
|
||
TGroup:TGroup.Self,act:"max",CdType:2,AType:AType.linear,RType:RType.linear,EType:EType.animationEnd,fname:"max_blue",flash:true,with:90,
|
||
debuff:0,deV:0,deC:0,deR:100,in:2,ap:70,cd:5,hit:1,hited:0.3,shield:0,speed:720,sonsk:0,hero:5211,cost:10,info:"召唤一个与施法者等级相同的骷髅战士为我方而战"},
|
||
|
||
|
||
|
||
}; |