This commit is contained in:
2024-09-12 07:58:03 +08:00
parent 4501876c37
commit 50d192b7b1
64 changed files with 12158 additions and 4612 deletions

View File

@@ -104,7 +104,7 @@ export class CSkillComp extends CCComp {
if (heros.length > 0) {
if(SkillSet[uuid].type==92){ //随机添加buff
let i = RandomManager.instance.getRandomInt(0,heros.length-1,3)
heros[i].HeroBuff.add_buff(uuid,args);
this.do_add_buff(heros[i],uuid,args)
}else{
for (let i = 0; i < heros.length; i++) {
let hero = heros[i];
@@ -114,12 +114,12 @@ export class CSkillComp extends CCComp {
t_hero = hero
}
}else{ //群体
hero.HeroBuff.add_buff(uuid,args);
this.do_add_buff(hero,uuid,args)
}
}
if(t_hero){ //血量最少单体
t_hero.HeroBuff.add_buff(uuid,args);
this.do_add_buff(t_hero,uuid,args)
}
}
@@ -127,7 +127,7 @@ export class CSkillComp extends CCComp {
}
// oops.message.dispatchEvent("add_buff",{uuid:this.skill_uuid,eid:0,group:BoxSet.HERO})
}
single_least_add_buff(target:any,uuid:number,args:any) {
do_add_buff(target:any,uuid:number,args:any) {
let buff = SkillSet[uuid]
if(buff.hp > 0 ){
target.HeroView.add_hp(buff.hp+args.hp)
@@ -135,8 +135,12 @@ export class CSkillComp extends CCComp {
if(buff.atk > 0 ){
target.HeroView.add_atk(buff.atk+args.atk,buff.bsd)
}
if(buff.shield > 0 ){
target.HeroView.add_shield(buff.shield+args.shield,buff.bsd)
}
}
/** 全局消息逻辑处理 */
// private onHandler(event: string, args: any) {
// switch (event) {