信息展示 继续

This commit is contained in:
2025-06-25 17:00:43 +08:00
parent 75136d665b
commit db0a0dd19c
12 changed files with 6500 additions and 5891 deletions

View File

@@ -42,7 +42,6 @@ export class SkillConComp extends CCComp {
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)) {
if(this.HeroView.is_dead) return
@@ -133,7 +132,7 @@ export class SkillConComp extends CCComp {
}
check_double_atk(count:number){
let random = Math.random()*100
if(random < FightSet.DOUBLE_ATK_RATE*count){
if(random < FightSet.DOUBLE_ATK_RATE*count){ //多次攻击概率
return true
}
return false
@@ -186,15 +185,11 @@ export class SkillConComp extends CCComp {
Object.values(this._timers).forEach(clearTimeout);
}
get_cd(cd:number,view:HeroViewComp){
let buff_key=null
if(view.is_master) {buff_key="hero"}
if(view.is_friend) {buff_key="friend"}
if(view.is_boss) {buff_key="enemy"}
if(view.is_kalami) {buff_key="enemy"}
if(buff_key==null) return
let debuff=this.FIGHTCON[buff_key+"_debuff"]
let buff=this.FIGHTCON[buff_key+"_buff"]
let buff=this.get_buff(view)
let buff_cd=0
if(buff!=null) buff_cd=buff.ATK_CD
// 汇总DEBUFF_DECD并处理count值
let decd = 0;
for (let i = view.DEBUFF_DECDS.length - 1; i >= 0; i--) {
@@ -213,21 +208,21 @@ export class SkillConComp extends CCComp {
view.BUFF_CDS.splice(i, 1);
}
}
return cd*(100-bcd-buff.ATK_CD)/100
return cd*(100-bcd-buff_cd+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)
}else{
return count+(this.FIGHTCON.friend_buff.ATK_COUNT)
}
}else{
return count+(this.FIGHTCON.enemy_buff.ATK_COUNT)
}
let buff=this.get_buff(view)
if(buff==null) return count
let re=count+(buff.ATK_COUNT)
if(re<1) re=1
return re
}
get_buff(view:HeroViewComp){
if(view.is_master) return this.FIGHTCON.hero_buff
if(view.is_friend) return this.FIGHTCON.friend_buff
if(view.is_boss||view.is_kalami) return this.FIGHTCON.enemy_buff
return null
}
reset() {
this.clear_timer();