refactor(MissionHeroComp): 移除闲置的驻场技能总加成计算方法

This commit is contained in:
panw
2026-05-21 16:20:54 +08:00
parent c5f1fb9993
commit 654e39ff5b
6 changed files with 55 additions and 26 deletions

View File

@@ -47,6 +47,7 @@ import { Tooltip } from "../skill/Tooltip";
import { CardInitCoins } from "../common/config/CardSet";
import { Timer } from "db://oops-framework/core/common/timer/Timer";
import { FieldSkillType } from "../common/config/SkillSet";
import { FieldSkillHelper } from "../hero/FieldSkillHelper";
import { spawningEngine } from "./RogueConfig";
import { MissionEconomy } from "./MissionEconomy";
const { ccclass, property } = _decorator;
@@ -579,9 +580,9 @@ export class MissionComp extends CCComp {
private triggerHeroBattleSkills(isStart: boolean) {
let triggerCount = 1;
if (isStart) {
triggerCount += HeroAttrsComp.getFieldSkillTotalValue(FieldSkillType.StartCount);
triggerCount += FieldSkillHelper.getFieldSkillTotalValue(FieldSkillType.StartCount);
} else {
triggerCount += HeroAttrsComp.getFieldSkillTotalValue(FieldSkillType.EndCount);
triggerCount += FieldSkillHelper.getFieldSkillTotalValue(FieldSkillType.EndCount);
}
triggerCount = Math.max(1, Math.floor(triggerCount));
@@ -600,7 +601,7 @@ export class MissionComp extends CCComp {
* 战斗结束阶段治疗所有英雄包括墓地英雄恢复70%最大生命值
*/
private healAllHeroes() {
const healRateBoost = HeroAttrsComp.getFieldSkillTotalValue(FieldSkillType.WaveHeal);
const healRateBoost = FieldSkillHelper.getFieldSkillTotalValue(FieldSkillType.WaveHeal);
const finalHealRate = Math.min(1, FightSet.WAVE_HEAL_RATE + healRateBoost);
ecs.query(this.heroAttrsMatcher).forEach(entity => {

View File

@@ -5,6 +5,7 @@ import { HeroAttrsComp } from "../hero/HeroAttrsComp";
import { FieldSkillType } from "../common/config/SkillSet";
import { TalentType } from "../common/config/TalentSet";
import { FightSet } from "../common/config/GameSet";
import { FieldSkillHelper } from "../hero/FieldSkillHelper";
/**
* 局内经济统一管理类
@@ -70,7 +71,7 @@ export class MissionEconomy {
*/
static getSellGold(): number {
const baseSellGold = 1; // 基础卖出金币
const goldBoost = HeroAttrsComp.getFieldSkillTotalValue(FieldSkillType.SellGold);
const goldBoost = FieldSkillHelper.getFieldSkillTotalValue(FieldSkillType.SellGold);
let totalSellGold = baseSellGold + goldBoost;
// 应用天赋 SellBonus (增加数值)
const bonusGold = HeroAttrsComp.getTalentValue(TalentType.SellBonus);
@@ -94,7 +95,7 @@ export class MissionEconomy {
*/
static getWaveGold(baseReward: number): number {
let reward = Math.max(0, Math.floor(baseReward));
const goldBoost = HeroAttrsComp.getFieldSkillTotalValue(FieldSkillType.WaveGold);
const goldBoost = FieldSkillHelper.getFieldSkillTotalValue(FieldSkillType.WaveGold);
reward += goldBoost;
return reward;
}