mirror of
https://github.com/Shu-Ying/noname-shuying.git
synced 2026-10-19 05:39:59 +08:00
feat # 继续补全遗物系统
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { canUpgradeCard } from "../cards/upgrades.js";
|
||||
import { canAcquireRelic } from "../relics/definitions.js";
|
||||
import { grantGold } from "../relics/progression.js";
|
||||
|
||||
export function prepareRewardPackage(run, spec, randomChoices) {
|
||||
if (!Number.isSafeInteger(spec.gold) || spec.gold < 0) {
|
||||
@@ -32,8 +33,7 @@ export function applyRewardPackage(run, pack, selection, applyReward) {
|
||||
throw new Error("遗物选择无效");
|
||||
}
|
||||
}
|
||||
run.player.gold += pack.gold;
|
||||
run.statistics.goldEarned += pack.gold;
|
||||
grantGold(run,pack.gold);
|
||||
if (selection.cardId !== null) card.upgrade = (card.upgrade || 0) + 1;
|
||||
if (relic) applyReward(run, relic.id);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user