基础主将添加+ 修复第一次伤害计算为穿刺伤害bug
This commit is contained in:
@@ -88,19 +88,6 @@ export class SkillCom extends CCComp {
|
||||
if(this.group==BoxSet.MONSTER) bm.controlPointSide=-1
|
||||
bm.moveTo(this.targetPos)
|
||||
break;
|
||||
case AType.linear:
|
||||
// this.distance_x=SkillSet[this.s_uuid].in*this.speed
|
||||
// this.t_end_x =400
|
||||
// if(this.group==BoxSet.MONSTER){
|
||||
// this.t_end_x=-400
|
||||
// this.node.scale=v3(this.node.scale.x*-1,1,1)
|
||||
// }
|
||||
// this.tweenInstance = tween(this.node).to(SkillSet[this.s_uuid].in, { position:v3(this.t_end_x,this.node.position.y,0)},{
|
||||
// onComplete: (target?: object) => {
|
||||
// // this.node.setPosition(tx,this.node.position.y-300,0)
|
||||
// }
|
||||
// }).start()
|
||||
break;
|
||||
case AType.fixedStart:
|
||||
|
||||
break;
|
||||
@@ -126,7 +113,6 @@ export class SkillCom extends CCComp {
|
||||
|
||||
}
|
||||
|
||||
|
||||
onAnimationFinished(){
|
||||
if(SkillSet[this.s_uuid].EType==EType.timeEnd) return
|
||||
this.is_destroy=true
|
||||
@@ -146,12 +132,11 @@ export class SkillCom extends CCComp {
|
||||
}
|
||||
//单体伤害
|
||||
single_damage(target:HeroViewComp){
|
||||
this.hit_count++
|
||||
console.log("[SkillCom]:onBeginContact hit_count:",this.hit_count,SkillSet[this.s_uuid].hit)
|
||||
if(this.hit_count>=(SkillSet[this.s_uuid].hit+this.puncture)) this.is_destroy=true // 技能命中次数
|
||||
if(target == null) return;
|
||||
// console.log("[SkillCom]:onBeginContact hit_count:",this.hit_count,SkillSet[this.s_uuid].hit)
|
||||
if(this.hit_count > 0) this.ap=this.ap*(50+this.puncture_damage)/100 // 穿刺后 伤害减半
|
||||
if(target == null) return;
|
||||
target.do_atked(this.ap,this.caster_crit,this.caster_crit_d) // ap 及暴击 属性已经在skill.ts 处理
|
||||
console.log("[SkillCom]:single_damage",this.ap,this.caster_crit,this.caster_crit_d)
|
||||
if(SkillSet[this.s_uuid].debuff>0){
|
||||
let deUP =this.get_debuff() // 因为不是每个技能都需要,debuff的增益在这里处理, ap 及暴击 属性已经在skill.ts 处理
|
||||
let debuff=SkillSet[this.s_uuid]
|
||||
@@ -162,6 +147,8 @@ export class SkillCom extends CCComp {
|
||||
console.log("[SkillCom]:debuff",SkillSet[this.s_uuid].name,debuff.debuff,deUP.deV,deUP.deC)
|
||||
target.add_debuff(debuff.debuff,dev,deC,deR)
|
||||
}
|
||||
this.hit_count++
|
||||
if(this.hit_count>=(SkillSet[this.s_uuid].hit+this.puncture)) this.is_destroy=true // 技能命中次数
|
||||
}
|
||||
|
||||
onBeginContact (seCol: Collider2D, oCol: Collider2D) {
|
||||
@@ -188,9 +175,11 @@ export class SkillCom extends CCComp {
|
||||
|
||||
private startLinearMove(dt: number) {
|
||||
if (!this.speed || this.is_destroy) return;
|
||||
|
||||
if(this.s_uuid == 6005){
|
||||
console.log("[SkillCom]:startLinearMove",this.node.position.x)
|
||||
}
|
||||
// 使用角度方向移动
|
||||
const newX = this.node.position.x + this.speed * dt;
|
||||
const newX = this.node.position.x + this.speed * dt*this.scale;
|
||||
const newY = this.node.position.y;
|
||||
this.node.setPosition(newX, this.node.position.y, this.node.position.z);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user