装备改为 buff 和 debuff 2种加成

This commit is contained in:
2025-06-14 22:54:07 +08:00
parent d01b98f9c3
commit cb91e66646
8 changed files with 162 additions and 144 deletions

View File

@@ -37,20 +37,8 @@ export class SkillConComp extends CCComp {
if(!smc.mission.play||smc.mission.pause) return
this.HeroView.at += dt;
let cd = this.HeroView.cd
let count=1
if(this.HeroView.fac==FacSet.HERO){
if(this.HeroView.is_master){
count+=this.FIGHTCON.hero.ATK_COUNT+this.FIGHTCON.ally.ATK_COUNT-this.FIGHTCON.hero_debuff.DECOUNT-this.FIGHTCON.ally_debuff.DECOUNT
cd=this.HeroView.cd*(100-this.FIGHTCON.hero.ATK_CD-this.FIGHTCON.ally.ATK_CD+this.FIGHTCON.hero_debuff.DECD+this.FIGHTCON.ally_debuff.DECD)/100
}else{
count+=this.FIGHTCON.friend.ATK_COUNT+this.FIGHTCON.ally.ATK_COUNT-this.FIGHTCON.friend_debuff.DECOUNT-this.FIGHTCON.ally_debuff.DECOUNT
cd=this.HeroView.cd*(100-this.FIGHTCON.friend.ATK_CD-this.FIGHTCON.ally.ATK_CD+this.FIGHTCON.friend_debuff.DECD+this.FIGHTCON.ally_debuff.DECD)/100
}
}else{
count+=this.FIGHTCON.enemy.ATK_COUNT-this.FIGHTCON.enemy_debuff.DECOUNT
cd=this.HeroView.cd*(100-this.FIGHTCON.enemy.ATK_CD+this.FIGHTCON.enemy_debuff.DECD)/100
}
let cd = this.get_cd(this.HeroView.cd,this.HeroView)
let count=this.get_count(1,this.HeroView)
if(count<1) count=1
// console.log(this.HeroView.hero_name+(this.HeroView.is_master?"[主]":"[从] 准备释放")+SkillSet[this.HeroView.atk_skill].name+"=>"+"=>cd:"+cd+"=> count:"+count)
if (this.HeroView.is_atking &&(this.HeroView.at > cd)) {
@@ -61,13 +49,35 @@ export class SkillConComp extends CCComp {
this.HeroView.at = 0;
}
}
get_cd(cd:number,view:HeroViewComp){
if(view.fac==FacSet.HERO){
if(view.is_master){
return cd*(100-this.FIGHTCON.hero_buff.ATK_CD+this.FIGHTCON.hero_debuff.DECD)/100
}else{
return cd*(100-this.FIGHTCON.friend_buff.ATK_CD+this.FIGHTCON.hero_debuff.DECD)/100
}
}else{
return cd*(100-this.FIGHTCON.enemy_buff.ATK_CD+this.FIGHTCON.enemy_debuff.DECD)/100
}
}
get_count(count:number,view:HeroViewComp){
if(view.fac==FacSet.HERO){
if(view.is_master){
return count+(this.FIGHTCON.hero_buff.ATK_COUNT-this.FIGHTCON.hero_debuff.DECOUNT)
}else{
return count+(this.FIGHTCON.friend_buff.ATK_COUNT-this.FIGHTCON.hero_debuff.DECOUNT)
}
}else{
return count+(this.FIGHTCON.enemy_buff.ATK_COUNT-this.FIGHTCON.enemy_debuff.DECOUNT)
}
}
cast_master_skill(e:string,uuid:any){
if(!this.HeroView) return
if(!this.HeroView.is_master) return
console.log("hart cast_skill",uuid ,e)
const config = SkillSet[uuid];
this.castSkill(config,1,this.FIGHTCON.hero.SKILL_DMG)
this.castSkill(config,1,this.FIGHTCON.hero_buff.SKILL_DMG)
}
/** 施放技能 */