buff 重设 英雄和伙伴 改为公用debuff
This commit is contained in:
@@ -67,28 +67,28 @@ export class SkillConComp extends CCComp {
|
||||
if(!this.HeroView.is_master) return
|
||||
console.log("hart cast_skill",uuid ,e)
|
||||
const config = SkillSet[uuid];
|
||||
this.castSkill(config)
|
||||
this.castSkill(config,1,this.FIGHTCON.hero.SKILL_DMG)
|
||||
}
|
||||
|
||||
/** 施放技能 */
|
||||
castSkill(config: typeof SkillSet[keyof typeof SkillSet],count:number=1) {
|
||||
castSkill(config: typeof SkillSet[keyof typeof SkillSet],count:number=1,dmg:number=0) {
|
||||
// console.log(view.uuid+"=>"+view.hero_name+"施放技能:"+config.uuid);
|
||||
if (config.TargetGroup === TargetGroup.Enemy) {
|
||||
this.HeroView.playSkillEffect(config.uuid);
|
||||
this.doSkill(config,count);
|
||||
this.doSkill(config,count,dmg);
|
||||
}
|
||||
|
||||
if (config.TargetGroup === TargetGroup.Ally) {
|
||||
const targets = this.selectAllyTargets( config);
|
||||
if (targets.length === 0) return;
|
||||
this.doSkill(config,count);
|
||||
this.doSkill(config,count,dmg);
|
||||
}
|
||||
if (config.TargetGroup === TargetGroup.Self) {
|
||||
this.doSkill(config,count);
|
||||
this.doSkill(config,count,dmg);
|
||||
}
|
||||
|
||||
}
|
||||
private doSkill(config: typeof SkillSet[keyof typeof SkillSet],count:number=1,angle:number=0) {
|
||||
private doSkill(config: typeof SkillSet[keyof typeof SkillSet],count:number=1,angle:number=0,dmg:number=0) {
|
||||
// 添加节点有效性检查
|
||||
if (!this.node || !this.node.isValid || !this.HeroView || !this.HeroView.node || !this.HeroView.node.isValid) {
|
||||
return;
|
||||
@@ -116,7 +116,8 @@ export class SkillConComp extends CCComp {
|
||||
config.uuid,
|
||||
new Vec3(targetView.node.position.x, targetView.node.position.y, 0),
|
||||
this.HeroView,
|
||||
angle
|
||||
angle,
|
||||
dmg
|
||||
);
|
||||
}, 300);
|
||||
count-=1
|
||||
|
||||
Reference in New Issue
Block a user