信息展示 继续
This commit is contained in:
@@ -70,18 +70,8 @@ export class SkillCom extends CCComp {
|
||||
oops.message.on(GameEvent.MissionEnd, this.doDestroy, this);
|
||||
this.node.active = true;
|
||||
console.log("[SkillCom]:caster",this.caster)
|
||||
if(this.caster.fac==FacSet.HERO){
|
||||
if(this.caster.is_master){
|
||||
this.caster_crit = this.caster.crit+this.FIGHTCON.hero_buff.CRITICAL+this.FIGHTCON.hero_debuff.CRITICAL
|
||||
this.caster_crit_d = this.caster.crit_d+this.FIGHTCON.hero_buff.CRITICAL_DMG
|
||||
}else{
|
||||
this.caster_crit = this.caster.crit+this.FIGHTCON.friend_buff.CRITICAL+this.FIGHTCON.hero_debuff.CRITICAL
|
||||
this.caster_crit_d = this.caster.crit_d+this.FIGHTCON.friend_buff.CRITICAL_DMG
|
||||
}
|
||||
}else{
|
||||
this.caster_crit = this.caster.crit+this.FIGHTCON.enemy_buff.CRITICAL+this.FIGHTCON.enemy_debuff.CRITICAL
|
||||
this.caster_crit_d = this.caster.crit_d+this.FIGHTCON.enemy_buff.CRITICAL_DMG
|
||||
}
|
||||
|
||||
|
||||
let collider = this.getComponent(Collider2D);
|
||||
if(collider) {
|
||||
collider.group = this.group;
|
||||
@@ -161,7 +151,8 @@ export class SkillCom extends CCComp {
|
||||
if(target == null) return;
|
||||
target.do_atked(this.ap,crit,crit_d)
|
||||
if(SkillSet[this.s_uuid].debuff>0){
|
||||
target.add_debuff(SkillSet[this.s_uuid].debuff,SkillSet[this.s_uuid].deV,SkillSet[this.s_uuid].deC)
|
||||
let debuff =this.get_debuff()
|
||||
target.add_debuff(SkillSet[this.s_uuid].debuff,debuff.deV,debuff.deC)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -174,7 +165,17 @@ export class SkillCom extends CCComp {
|
||||
// this.ent.destroy()
|
||||
}
|
||||
}
|
||||
|
||||
get_debuff(){ //debuff 加成
|
||||
let debuff = {deV:0,deC:0}
|
||||
let buff=null
|
||||
if(this.caster.is_master) buff = this.FIGHTCON.hero_buff
|
||||
if(this.caster.is_friend) buff = this.FIGHTCON.friend_buff
|
||||
if(this.caster.is_boss||this.caster.is_kalami) buff = this.FIGHTCON.enemy_buff
|
||||
if(buff==null) return debuff
|
||||
debuff.deV=buff.DEBUFF_VALUE
|
||||
debuff.deC=buff.DEBUFF_COUNT
|
||||
return debuff
|
||||
}
|
||||
|
||||
private startLinearMove(dt: number) {
|
||||
if (!this.speed || this.is_destroy) return;
|
||||
|
||||
Reference in New Issue
Block a user