chore: 移除游戏内天赋系统相关代码
1. 删除所有TalentType相关导入和天赋数据存储逻辑 2. 移除英雄属性天赋加成计算逻辑 3. 移除卡牌购买、刷新、售卖的天赋优惠逻辑 4. 将getTalentValue方法降级为空实现 5. 清理多余的空行代码格式
This commit is contained in:
@@ -3,7 +3,6 @@ import { oops } from "../../../../extensions/oops-plugin-framework/assets/core/O
|
||||
import { GameEvent } from "../common/config/GameEvent";
|
||||
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";
|
||||
|
||||
@@ -23,7 +22,7 @@ export class MissionEconomy {
|
||||
amount = Math.floor(amount);
|
||||
smc.vmdata.mission_data.coin = this.getCoin() + amount;
|
||||
smc.vmdata.scores.gold_earned += amount;
|
||||
|
||||
|
||||
// 发送 UI 更新事件,这里我们统一使用 syncOnly 通知 UI 刷新即可
|
||||
oops.message.dispatchEvent(GameEvent.CoinAdd, { delta: amount, syncOnly: true });
|
||||
}
|
||||
@@ -34,10 +33,10 @@ export class MissionEconomy {
|
||||
amount = Math.floor(amount);
|
||||
const current = this.getCoin();
|
||||
if (current < amount) return false;
|
||||
|
||||
|
||||
smc.vmdata.mission_data.coin = current - amount;
|
||||
smc.vmdata.scores.gold_spent += amount;
|
||||
|
||||
|
||||
// 发送 UI 更新事件
|
||||
oops.message.dispatchEvent(GameEvent.CoinAdd, { delta: -amount, syncOnly: true });
|
||||
return true;
|
||||
@@ -49,8 +48,7 @@ export class MissionEconomy {
|
||||
*/
|
||||
static getRefreshCost(baseCost: number = 1): number {
|
||||
let cost = baseCost;
|
||||
const discount = HeroAttrsComp.getTalentValue(TalentType.RefreshDiscount);
|
||||
cost = Math.max(0, cost - discount);
|
||||
// 天赋系统已移除:刷新卡牌费用不再有优惠
|
||||
return Math.floor(cost);
|
||||
}
|
||||
|
||||
@@ -73,12 +71,8 @@ export class MissionEconomy {
|
||||
const sellByLevel: Record<number, number> = { 1: 3, 2: 10, 3: 25 };
|
||||
const baseSellGold = sellByLevel[heroLevel] || 3;
|
||||
const goldBoost = FieldSkillHelper.getFieldSkillTotalValue(FieldSkillType.SellGold);
|
||||
let totalSellGold = baseSellGold + goldBoost;
|
||||
// 应用天赋 SellBonus (增加数值)
|
||||
const bonusGold = HeroAttrsComp.getTalentValue(TalentType.SellBonus);
|
||||
if (bonusGold > 0) {
|
||||
totalSellGold += bonusGold;
|
||||
}
|
||||
const totalSellGold = baseSellGold + goldBoost;
|
||||
// 天赋系统已移除:不再追加 SellBonus
|
||||
return Math.floor(totalSellGold);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user