refactor: 移除驻场技能的折扣与收益加成逻辑
1. 删除所有与BuyDiscount、RefreshDiscount、SellGold、WaveGold相关的技能配置与代码逻辑 2. 简化卡牌购买价格、出售价格、刷新费用和回合金币收益的计算逻辑,不再依赖驻场技能加成 3. 更新英雄盒子的出售价格注释,移除驻场加成说明
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user