buff 重设 英雄和伙伴 改为公用debuff
This commit is contained in:
@@ -10,6 +10,7 @@ import { BoxSet } from "../common/config/BoxSet";
|
||||
import { HeroFac, HeroSet } from "../common/config/heroSet";
|
||||
import { HeroViewComp } from "../hero/HeroViewComp";
|
||||
import { BezierMove } from "../BezierMove/BezierMove";
|
||||
import { FightConComp } from "../map/FightConComp";
|
||||
|
||||
|
||||
const { ccclass, property } = _decorator;
|
||||
@@ -41,10 +42,11 @@ export class SkillCom extends CCComp {
|
||||
distance_x:number=0;
|
||||
distance_y:number=0;
|
||||
ap:number=0;
|
||||
FIGHTCON:FightConComp=null;
|
||||
private moveDirection: Vec3 | null = null; // 添加一个属性来存储移动方向
|
||||
|
||||
protected onLoad(): void {
|
||||
|
||||
this.FIGHTCON=this.node.parent.getComponent(FightConComp)
|
||||
|
||||
}
|
||||
|
||||
@@ -115,6 +117,9 @@ export class SkillCom extends CCComp {
|
||||
if(oCol.group!=this.group){
|
||||
if(target == null) return;
|
||||
let remainingDamage = this.ap;
|
||||
if(target.fac == BoxSet.HERO ){
|
||||
remainingDamage=remainingDamage*(100-this.FIGHTCON.hero.DEF+this.FIGHTCON.hero_debuff.BURN)/100
|
||||
}
|
||||
target.do_atked(remainingDamage)
|
||||
this.ent.destroy()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user