chore: 移除游戏内天赋系统相关代码
1. 删除所有TalentType相关导入和天赋数据存储逻辑 2. 移除英雄属性天赋加成计算逻辑 3. 移除卡牌购买、刷新、售卖的天赋优惠逻辑 4. 将getTalentValue方法降级为空实现 5. 清理多余的空行代码格式
This commit is contained in:
@@ -33,7 +33,6 @@ import { smc } from "../common/SingletonModuleComp";
|
||||
|
||||
import { UIID } from "../common/config/GameUIConfig";
|
||||
import { HeroAttrsComp } from "../hero/HeroAttrsComp";
|
||||
import { TalentType } from "../common/config/TalentSet";
|
||||
import { getLvColor } from "../common/config/GameSet";
|
||||
import { MissionEconomy } from "./MissionEconomy";
|
||||
|
||||
@@ -250,10 +249,7 @@ export class CardComp extends CCComp {
|
||||
this.card_type = data.type;
|
||||
|
||||
let baseCost = data.cost ?? 0;
|
||||
if (this.card_type === CardType.Hero) {
|
||||
const discount = HeroAttrsComp.getTalentValue(TalentType.BuyDiscount);
|
||||
baseCost = Math.max(0, baseCost - discount);
|
||||
}
|
||||
// 天赋系统已移除:购买费用不再有优惠
|
||||
this.card_cost = Math.floor(baseCost);
|
||||
|
||||
this.node.active = true;
|
||||
|
||||
@@ -25,7 +25,6 @@ import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/modu
|
||||
import { HeroInfo } from "../common/config/heroSet";
|
||||
import { HeroAttrsComp } from "../hero/HeroAttrsComp";
|
||||
import { smc } from "../common/SingletonModuleComp";
|
||||
import { TalentType } from "../common/config/TalentSet";
|
||||
import { Hero } from "../hero/Hero";
|
||||
import { FieldSkillType } from "../common/config/SkillSet";
|
||||
import { buildSkillDesc } from "../common/config/HeroSkillDesc";
|
||||
|
||||
@@ -47,7 +47,6 @@ import { HeroViewComp } from "../hero/HeroViewComp";
|
||||
import { FacSet, FightSet } from "../common/config/GameSet";
|
||||
import { MoveComp } from "../hero/MoveComp";
|
||||
import { MissionHeroComp } from "./MissionHeroComp";
|
||||
import { TalentType } from "../common/config/TalentSet";
|
||||
import { MissionEconomy } from "./MissionEconomy";
|
||||
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@@ -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