refactor: 移除驻场技能的折扣与收益加成逻辑

1.  删除所有与BuyDiscount、RefreshDiscount、SellGold、WaveGold相关的技能配置与代码逻辑
2.  简化卡牌购买价格、出售价格、刷新费用和回合金币收益的计算逻辑,不再依赖驻场技能加成
3.  更新英雄盒子的出售价格注释,移除驻场加成说明
This commit is contained in:
panFD
2026-08-15 16:21:29 +08:00
parent 753563186a
commit ac2e849821
6 changed files with 6 additions and 47 deletions

View File

@@ -33,8 +33,6 @@ import { smc } from "../common/SingletonModuleComp";
import { UIID } from "../common/config/GameUIConfig";
import { HeroAttrsComp } from "../hero/HeroAttrsComp";
import { FieldSkillType } from "../common/config/SkillSet";
import { FieldSkillHelper } from "../hero/FieldSkillHelper";
import { MissionEconomy } from "./MissionEconomy";
@@ -255,13 +253,7 @@ export class CardComp extends CCComp {
this.card_uuid = data.uuid;
this.card_type = data.type;
let baseCost = data.cost ?? 0;
if (this.card_type === CardType.Hero) {
// 驻场英雄带来的"购买优惠"折扣
const discount = FieldSkillHelper.getFieldSkillTotalValue(FieldSkillType.BuyDiscount);
baseCost = Math.max(0, baseCost - discount);
}
this.card_cost = Math.floor(baseCost);
this.card_cost = Math.floor(data.cost ?? 0);
this.node.active = true;
this.applyCardUI();

View File

@@ -540,7 +540,7 @@ export class HeroBoxComp extends CCComp {
this.level_label.color = getLvColor(lv);
}
// ---- 出售价格(按等级计算,含驻场 SellGold 加成 ----
// ---- 出售价格(按等级计算) ----
if (this.sell_price_label && this.sell_price_label.isValid) {
const lv = Math.max(1, Math.floor(this.model.lv ?? 1));
this.sell_price_label.string = `${MissionEconomy.getSellGold(lv)}`;

View File

@@ -2,8 +2,6 @@ import { smc } from "../common/SingletonModuleComp";
import { oops } from "../../../../extensions/oops-plugin-framework/assets/core/Oops";
import { GameEvent } from "../common/config/GameEvent";
import { FightSet } from "../common/config/GameSet";
import { FieldSkillType } from "../common/config/SkillSet";
import { FieldSkillHelper } from "../hero/FieldSkillHelper";
/**
* 局内经济统一管理类
@@ -46,11 +44,7 @@ export class MissionEconomy {
* @param baseCost 基础费用默认为1
*/
static getRefreshCost(baseCost: number = 1): number {
let cost = baseCost;
// 驻场英雄带来的"刷新优惠"折扣
const discount = FieldSkillHelper.getFieldSkillTotalValue(FieldSkillType.RefreshDiscount);
cost = Math.max(0, cost - discount);
return Math.floor(cost);
return Math.floor(Math.max(0, baseCost));
}
/** 获取当前刷新石数量 */
@@ -135,11 +129,7 @@ export class MissionEconomy {
const lv = Math.max(1, Math.floor(heroLevel));
// 基础出售价 3保底招募残值+ 累计升级投入的 50%
const investTotal = 5 * (Math.pow(2, lv - 1) - 1);
const baseSellGold = 3 + Math.floor(investTotal * 0.5);
// 驻场英雄带来的"出售金币"加成(包含原 SellBonus 语义,统一在 SellGold 中)
const goldBoost = FieldSkillHelper.getFieldSkillTotalValue(FieldSkillType.SellGold);
const totalSellGold = baseSellGold + goldBoost;
return Math.floor(totalSellGold);
return Math.floor(3 + Math.floor(investTotal * 0.5));
}
/**
@@ -155,10 +145,7 @@ export class MissionEconomy {
* 计算每回合基础金币收益
*/
static getWaveGold(baseReward: number): number {
let reward = Math.max(0, Math.floor(baseReward));
const goldBoost = FieldSkillHelper.getFieldSkillTotalValue(FieldSkillType.WaveGold);
reward += goldBoost;
return reward;
return Math.max(0, Math.floor(baseReward));
}
/**