dd
This commit is contained in:
@@ -56,7 +56,7 @@ export enum CdType {
|
||||
export enum AType {
|
||||
linear = 0, // 直线
|
||||
parabolic = 1, // 抛射物
|
||||
fixedStart = 2, // 固定在出发点
|
||||
fixedStart = 2, // 固定在出发点,物理攻击
|
||||
fixedEnd = 3, // 固定在终点
|
||||
StartEnd = 4, // 固定在出发点和终点 用于治疗和buff类技能
|
||||
}
|
||||
@@ -261,6 +261,9 @@ export const SkillSet = {
|
||||
TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,CdType:1,AType:AType.linear,RType:RType.linear,EType:EType.collision,fname:"max",flash:false,with:0,
|
||||
debuff:0,deV:0,deC:0,deR:100,in:8,ap:100,cd:5,hit:1,hited:3,shield:0,heal:0,speed:720,hero:0,cost:10,info:"向最前方敌人扔出石斧,造成100%攻击的伤害"},
|
||||
|
||||
6013:{uuid:6013,name:"普通攻击",for_hero:false,sp_name:"base6",path:"3036",quality:Quality.WHITE, TType:TType.Frontline,maxC:1,
|
||||
TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,CdType:1,AType:AType.fixedStart,RType:RType.linear,EType:EType.animationEnd,fname:"max",flash:false,with:0,
|
||||
debuff:0,deV:0,deC:0,deR:100,in:8,ap:100,cd:5,hit:1,hited:0.2,shield:0,heal:0,speed:720,hero:0,cost:10,info:"向最前方敌人扔出石斧,造成100%攻击的伤害"},
|
||||
|
||||
6020:{uuid:6020,name:"冰暴",for_hero:true,sp_name:"bingyu",path:"3135",quality:Quality.BLUE, TType:TType.Frontline,maxC:1,
|
||||
TGroup:TGroup.Ally,SType:SType.damage,act:"atk",DTType:DTType.range,CdType:2,AType:AType.fixedEnd,RType:RType.fixed,EType:EType.timeEnd,fname:"max",flash:false,with:90,
|
||||
|
||||
@@ -41,8 +41,8 @@ export const MonList = [5201,5202,5203,5204,5205,5206,5219,5220,5221,5222,5223,5
|
||||
export const Masters = [5001,5002,5003,5004]
|
||||
|
||||
export const HeroPos={
|
||||
0:{pos:v3(-290,10,0)},
|
||||
1:{pos:v3(-200,0,0)},
|
||||
0:{pos:v3(-290,0,0)},
|
||||
1:{pos:v3(0,0,0)},
|
||||
2:{pos:v3(-100,0,0)},
|
||||
}
|
||||
export const HQuality = {
|
||||
@@ -227,72 +227,72 @@ export const HeroInfo = {
|
||||
|
||||
//主将
|
||||
5001:{uuid:5001,name:"刺心.艾吉斯",path:"k1", quality:HQuality.BLUE,lv:1,kind:1,
|
||||
type:HType.warrior,hp:50,ap:10,dis:600,cd:1.5,speed:50,skills:[6005,6022,6022],
|
||||
type:HType.warrior,hp:5000,ap:10,dis:600,cd:1.5,speed:50,skills:[6013,6022,6022],
|
||||
buff:[
|
||||
{buff_type:BuffAttr.PUNCTURE,value:1},
|
||||
],info:"剑类专精,穿刺伤害额外+10%"},
|
||||
|
||||
5002:{uuid:5002,name:"飓风.格罗姆",path:"k2", quality:HQuality.BLUE,lv:1,kind:1,
|
||||
type:HType.warrior,hp:50,ap:10,dis:600,cd:1.5,speed:50,skills:[6006,6022,6022],
|
||||
type:HType.warrior,hp:5000,ap:10,dis:600,cd:1.5,speed:50,skills:[6006,6022,6022],
|
||||
buff:[
|
||||
{buff_type:BuffAttr.WFUNY,value:10},
|
||||
],info:"斧类专精,风怒概率增加10%"},
|
||||
|
||||
5003:{uuid:5003,name:"碎颅.赫克托",path:"k4", quality:HQuality.BLUE,lv:1,kind:1,
|
||||
type:HType.warrior,hp:50,ap:10,dis:600,cd:1.5,speed:50,skills:[6007,6022,6022],
|
||||
type:HType.warrior,hp:5000,ap:10,dis:600,cd:1.5,speed:50,skills:[6007,6022,6022],
|
||||
buff:[
|
||||
{buff_type:BuffAttr.CRITICAL,value:10},
|
||||
],info:"锤类专精,暴击概率增加10%"},
|
||||
|
||||
5004:{uuid:5004,name:"裂伤.塔米拉",path:"k3", quality:HQuality.BLUE,lv:1,kind:1,
|
||||
type:HType.warrior,hp:50,ap:10,dis:600,cd:1.5,speed:50,skills:[6008,6022,6022],
|
||||
type:HType.warrior,hp:5000,ap:10,dis:600,cd:1.5,speed:50,skills:[6008,6022,6022],
|
||||
buff:[
|
||||
{buff_type:BuffAttr.BURN_COUNT,value:1},
|
||||
],info:"刀类专精,易伤效果额外持续1次"},
|
||||
|
||||
5005:{uuid:5005,name:"幽灵射手",path:"a4", quality:HQuality.BLUE,lv:1,kind:2,
|
||||
type:HType.remote,hp:50,ap:15,dis:600,cd:1.5,speed:50,skills:[6002,6022,6022],
|
||||
type:HType.remote,hp:5000,ap:15,dis:600,cd:1.5,speed:50,skills:[6002,6022,6022],
|
||||
buff:[
|
||||
|
||||
],info:"说明"},
|
||||
5006:{uuid:5006,name:"战争领主",path:"k5", quality:HQuality.BLUE,lv:1,kind:2,
|
||||
type:HType.warrior,hp:50,ap:10,dis:600,cd:1.5,speed:50,skills:[6001,6022,6022],
|
||||
type:HType.warrior,hp:5000,ap:10,dis:600,cd:1.5,speed:50,skills:[6001,6022,6022],
|
||||
buff:[
|
||||
|
||||
],info:"说明"},
|
||||
|
||||
5007:{uuid:5007,name:"混沌法师",path:"zh1", quality:HQuality.BLUE,lv:1,kind:2,
|
||||
type:HType.mage,hp:50,ap:10,dis:600,cd:1.5,speed:50,skills:[6001,6022,6022],
|
||||
type:HType.mage,hp:5000,ap:10,dis:600,cd:1.5,speed:50,skills:[6001,6022,6022],
|
||||
buff:[
|
||||
|
||||
],info:"说明"},
|
||||
|
||||
5008:{uuid:5008,name:"火焰法师",path:"zh2", quality:HQuality.BLUE,lv:1,kind:2,
|
||||
type:HType.mage,hp:50,ap:15,dis:600,cd:1.5,speed:50,skills:[6001,6022,6022],
|
||||
type:HType.mage,hp:5000,ap:15,dis:600,cd:1.5,speed:50,skills:[6001,6022,6022],
|
||||
buff:[
|
||||
|
||||
],info:"说明"},
|
||||
|
||||
5009:{uuid:5009,name:"风暴精灵",path:"m4", quality:HQuality.BLUE,lv:1,kind:2,
|
||||
type:HType.mage,hp:50,ap:15,dis:600,cd:1.5,speed:50,skills:[6001,6022,6022],
|
||||
type:HType.mage,hp:5000,ap:15,dis:600,cd:1.5,speed:50,skills:[6001,6022,6022],
|
||||
buff:[
|
||||
|
||||
],info:"说明"},
|
||||
|
||||
5010:{uuid:5010,name:"战争祭祀",path:"d2", quality:HQuality.BLUE,lv:1,kind:2,
|
||||
type:HType.mage,hp:50,ap:10,dis:600,cd:1.5,speed:50,skills:[6001,6022,6022],
|
||||
type:HType.mage,hp:5000,ap:10,dis:600,cd:1.5,speed:50,skills:[6001,6022,6022],
|
||||
buff:[
|
||||
|
||||
],info:"说明"},
|
||||
|
||||
5011:{uuid:5011,name:"暴风射手",path:"a5", quality:HQuality.BLUE,lv:1,kind:2,
|
||||
type:HType.remote,hp:50,ap:15,dis:600,cd:1.5,speed:50,skills:[6002,6022,6022],
|
||||
type:HType.remote,hp:5000,ap:15,dis:600,cd:1.5,speed:50,skills:[6002,6022,6022],
|
||||
buff:[
|
||||
|
||||
],info:"说明"},
|
||||
|
||||
5012:{uuid:5012,name:"苍穹射手",path:"a3", quality:HQuality.BLUE,lv:1,kind:1,
|
||||
type:HType.remote,hp:50,ap:15,dis:600,cd:1.5,speed:50,skills:[6002,6022,6022],
|
||||
type:HType.remote,hp:5000,ap:15,dis:600,cd:1.5,speed:50,skills:[6002,6022,6022],
|
||||
buff:[
|
||||
|
||||
],info:"说明"},
|
||||
@@ -300,7 +300,7 @@ export const HeroInfo = {
|
||||
|
||||
//怪物
|
||||
5201:{uuid:5201,name:"兽人战士",path:"mor1", quality:HQuality.GREEN,lv:1,kind:1,
|
||||
type:HType.warrior,hp:25,ap:8,dis:200,cd:2,speed:45,skills:[6007],
|
||||
type:HType.warrior,hp:25,ap:8,dis:90,cd:2,speed:45,skills:[6007],
|
||||
buff:[ ],info:"普通怪物-战士型"},
|
||||
|
||||
5202:{uuid:5202,name:"兽人刺客",path:"mor2", quality:HQuality.GREEN,lv:1,kind:1,
|
||||
@@ -308,7 +308,7 @@ export const HeroInfo = {
|
||||
buff:[ ],info:"普通怪物-战士型"},
|
||||
|
||||
5203:{uuid:5203,name:"兽人护卫",path:"mor3", quality:HQuality.GREEN,lv:1,kind:1,
|
||||
type:HType.warrior,hp:25,ap:8,dis:200,cd:2,speed:45,skills:[6007],
|
||||
type:HType.warrior,hp:25,ap:8,dis:90,cd:2,speed:45,skills:[6007],
|
||||
buff:[ ],info:"普通怪物-战士型"},
|
||||
|
||||
5204:{uuid:5204,name:"石卫", path:"mgem1",quality:HQuality.GREEN,lv:1,kind:1,
|
||||
@@ -326,11 +326,11 @@ export const HeroInfo = {
|
||||
|
||||
|
||||
5219:{uuid:5219,name:"牛头战士",path:"mn1", quality:HQuality.GREEN,lv:2,kind:1,
|
||||
type:HType.warrior,hp:25,ap:8,dis:200,cd:2,speed:45,skills:[6007],
|
||||
type:HType.warrior,hp:25,ap:8,dis:90,cd:2,speed:45,skills:[6007],
|
||||
buff:[ ],info:"普通怪物-战士型"},
|
||||
|
||||
5220:{uuid:5220,name:"牛头战士",path:"mn2", quality:HQuality.GREEN,lv:1,kind:1,
|
||||
type:HType.warrior,hp:25,ap:8,dis:200,cd:2,speed:45,skills:[6007],
|
||||
type:HType.warrior,hp:25,ap:8,dis:90,cd:2,speed:45,skills:[6007],
|
||||
buff:[ ],info:"普通怪物-战士型"},
|
||||
|
||||
5221:{uuid:5221,name:"牛头战士",path:"mn3", quality:HQuality.GREEN,lv:1,kind:1,
|
||||
@@ -338,11 +338,11 @@ export const HeroInfo = {
|
||||
buff:[ ],info:"普通怪物-战士型"},
|
||||
|
||||
5222:{uuid:5222,name:"独眼巨人",path:"md1", quality:HQuality.GREEN,lv:1,kind:1,
|
||||
type:HType.warrior,hp:25,ap:8,dis:200,cd:2,speed:45,skills:[6007],
|
||||
type:HType.warrior,hp:25,ap:8,dis:90,cd:2,speed:45,skills:[6007],
|
||||
buff:[ ],info:"普通怪物-战士型"},
|
||||
|
||||
5223:{uuid:5223,name:"独眼巨人",path:"md2", quality:HQuality.GREEN,lv:1,kind:1,
|
||||
type:HType.warrior,hp:25,ap:8,dis:200,cd:2,speed:45,skills:[6007],
|
||||
type:HType.warrior,hp:25,ap:8,dis:90,cd:2,speed:45,skills:[6007],
|
||||
buff:[ ],info:"普通怪物-战士型"},
|
||||
|
||||
5224:{uuid:5224,name:"独眼巨人",path:"md3", quality:HQuality.GREEN,lv:1,kind:1,
|
||||
@@ -350,15 +350,15 @@ export const HeroInfo = {
|
||||
buff:[ ],info:"普通怪物-战士型"},
|
||||
|
||||
5225:{uuid:5225,name:"精英独眼",path:"md4", quality:HQuality.BLUE,lv:1,kind:1,
|
||||
type:HType.warrior,hp:45,ap:12,dis:200,cd:2,speed:25,skills:[6007],
|
||||
type:HType.warrior,hp:45,ap:12,dis:300,cd:2,speed:25,skills:[6007],
|
||||
buff:[ ],info:"精英怪物-战士型"},
|
||||
|
||||
5226:{uuid:5226,name:"精英牛头",path:"mn4", quality:HQuality.BLUE,lv:1,kind:1,
|
||||
type:HType.warrior,hp:45,ap:12,dis:200,cd:2,speed:25,skills:[6007],
|
||||
type:HType.warrior,hp:45,ap:12,dis:300,cd:2,speed:25,skills:[6007],
|
||||
buff:[ ],info:"精英怪物-战士型"},
|
||||
|
||||
5227:{uuid:5227,name:"精英兽人",path:"mor4", quality:HQuality.BLUE,lv:1,kind:1,
|
||||
type:HType.warrior,hp:45,ap:12,dis:200,cd:2,speed:25,skills:[6007],
|
||||
type:HType.warrior,hp:45,ap:12,dis:300,cd:2,speed:25,skills:[6007],
|
||||
buff:[ ],info:"精英怪物-战士型"},
|
||||
|
||||
};
|
||||
|
||||
@@ -5,7 +5,7 @@ import { smc } from "../common/SingletonModuleComp";
|
||||
import { HeroModelComp } from "./HeroModelComp";
|
||||
import { HeroViewComp } from "./HeroViewComp";
|
||||
import { BoxSet, FacSet } from "../common/config/BoxSet";
|
||||
import { HeroInfo, HeroPos } from "../common/config/heroSet";
|
||||
import { HeroInfo, HeroPos, HType } from "../common/config/heroSet";
|
||||
import { BattleMoveComp } from "../common/ecs/position/BattleMoveComp";
|
||||
import { FriendModelComp } from "./FriendModel";
|
||||
import { MasterModelComp } from "./MasterModel";
|
||||
@@ -45,6 +45,7 @@ export class Hero extends ecs.Entity {
|
||||
var scene = smc.map.MapView.scene;
|
||||
node.parent = scene.entityLayer!.node!
|
||||
let pos=HeroPos[0].pos
|
||||
if(HeroInfo[uuid].type==HType.warrior) pos=HeroPos[1].pos
|
||||
node.setPosition(pos)
|
||||
var hv = this.hero_init(uuid,node)
|
||||
hv.scale = 1;
|
||||
|
||||
@@ -11,6 +11,7 @@ import { BezierMove } from "../BezierMove/BezierMove";
|
||||
import { MonModelComp } from "../hero/MonModelComp";
|
||||
import { FightSet } from "../common/config/Mission";
|
||||
import { HeroModelComp } from "../hero/HeroModelComp";
|
||||
import { Skill } from "./Skill";
|
||||
|
||||
|
||||
const { ccclass, property } = _decorator;
|
||||
@@ -134,12 +135,23 @@ export class SkillCom extends CCComp {
|
||||
}
|
||||
}
|
||||
break;
|
||||
case AType.fixedStart: //都是buff
|
||||
this.node.setPosition(this.startPos.x,this.startPos.y,0)
|
||||
this.scheduleOnce(()=>{
|
||||
this.do_buff()
|
||||
// console.log("[SkillCom]:fixedStart",SkillSet[this.s_uuid].in-0.2)
|
||||
},SkillSet[this.s_uuid].in-0.2)
|
||||
case AType.fixedStart: //
|
||||
this.node.setPosition(this.startPos.x,this.startPos.y,0)
|
||||
|
||||
if(this.node.getComponent(Animation)){
|
||||
let anim = this.node.getComponent(Animation);
|
||||
//console.log("[SkillCom]:has anim",anim)
|
||||
anim.on(Animation.EventType.FINISHED, this.onAnimationFinished, this);
|
||||
}
|
||||
if(this.node.getChildByName('anm')){
|
||||
if(this.node.getChildByName('anm').getComponent('sp.Skeleton')){
|
||||
//console.log("[SkillCom]:has spine",this.spine)
|
||||
this.spine.setCompleteListener((trackEntry) => {
|
||||
this.onAnimationFinished()
|
||||
//console.log("[SkillCom]:[track %s][animation %s] complete: %s", trackEntry.trackIndex);
|
||||
});
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -147,6 +159,7 @@ export class SkillCom extends CCComp {
|
||||
}
|
||||
|
||||
onAnimationFinished(){
|
||||
console.log("[SkillCom]:onAnimationFinished",this.s_uuid)
|
||||
if(SkillSet[this.s_uuid].EType==EType.timeEnd) return
|
||||
this.is_destroy=true
|
||||
}
|
||||
@@ -190,7 +203,7 @@ export class SkillCom extends CCComp {
|
||||
}
|
||||
this.hit_count++
|
||||
// console.log("[SkillCom]:碰撞次数:技能次数:穿刺次数",this.hit_count,SkillSet[this.s_uuid].hit,this.puncture)
|
||||
if(this.hit_count>=(SkillSet[this.s_uuid].hit+this.puncture)&&(SkillSet[this.s_uuid].DTType!=DTType.range)) this.is_destroy=true // 技能命中次数
|
||||
if(this.hit_count>=(SkillSet[this.s_uuid].hit+this.puncture)&&(SkillSet[this.s_uuid].DTType!=DTType.range)&&(SkillSet[this.s_uuid].EType!=EType.animationEnd)) this.is_destroy=true // 技能命中次数
|
||||
}
|
||||
|
||||
onBeginContact (seCol: Collider2D, oCol: Collider2D) {
|
||||
@@ -200,7 +213,7 @@ export class SkillCom extends CCComp {
|
||||
if(oCol.group!=this.group){
|
||||
if(target == null) return;
|
||||
// console.log("[SkillCom]:onBeginContact oCol||seCol",oCol.node.position,seCol.node.position)
|
||||
this.single_damage(target)
|
||||
this.single_damage(target,SkillSet[this.s_uuid].DTType==DTType.range?true:false)
|
||||
// this.ent.destroy()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user