能量增长完善 下一步 开始设计英雄

This commit is contained in:
2025-07-24 17:06:40 +08:00
parent 054fc0a44a
commit cafd6f4073
24 changed files with 3745 additions and 5249 deletions

View File

@@ -111,10 +111,7 @@ export class HeroViewComp extends CCComp {
DEBUFF_COUNT:number=0; //debuff 持续次数
DEBUFF_UP:number=0; //debuff 概率提升
ATK_TO_POWER:number=0;
ATKED_TO_POWER:number=0;
CRIT_TO_POWER:number=0;
DODGE_TO_POWER:number=0;
private damageQueue: Array<{
@@ -466,11 +463,11 @@ export class HeroViewComp extends CCComp {
let damage = this.count_damage(remainingDamage)
if(is_crit) {
damage = Math.floor(damage * (1 + (FightSet.CRIT_DAMAGE+crit_d)/100))
if(this.fac==FacSet.MON) smc.vmdata.hero.power+=this.CRIT_TO_POWER //暴击涨能量 怪物被暴击,因为只有一个英雄 直接处理
if(this.fac==FacSet.MON) smc.vmdata.hero.power+=smc.vmdata.hero.CRIT_TO_POWER //暴击涨能量 怪物被暴击,因为只有一个英雄 直接处理
}
this.hp -= damage;
if(this.fac==FacSet.HERO) {smc.vmdata.hero.power+=this.ATKED_TO_POWER;console.log("被攻击涨能量",this)} //被攻击涨能量
if(this.fac==FacSet.MON) {smc.vmdata.hero.power+=this.ATK_TO_POWER;console.log("攻击命中涨能量",this)} //攻击命中涨能量 因为是只有1个英雄 直接处理
if(this.fac==FacSet.HERO) {smc.vmdata.hero.power+=smc.vmdata.hero.ATKED_TO_POWER;console.log("被攻击涨能量",this)} //被攻击涨能量
if(this.fac==FacSet.MON) {smc.vmdata.hero.power+=smc.vmdata.hero.ATK_TO_POWER;console.log("攻击命中涨能量",this)} //攻击命中涨能量 因为是只有1个英雄 直接处理
if(this.hp <= 0) {
if(this == null) return;
@@ -536,7 +533,7 @@ export class HeroViewComp extends CCComp {
}
check_dodge(){
if(this.fac==FacSet.HERO) smc.vmdata.hero.power+=this.DODGE_TO_POWER //闪避涨能量
if(this.fac==FacSet.HERO) smc.vmdata.hero.power+=smc.vmdata.hero.DODGE_TO_POWER //闪避涨能量
if(this.dod > 0){
let random = Math.random()*100
if(random < this.dod) {