mirror of
https://github.com/Shu-Ying/noname-shuying.git
synced 2026-10-13 18:46:17 +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);
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ import { createInkletBattlePlan } from "../content/acts/act1/inklet-group.js";
|
||||
import { NIBBIT_PAIR_ENCOUNTER, createNibbitPairBattlePlan } from "../content/acts/act1/nibbit-pair.js";
|
||||
import { chooseEncounterEntry, createEncounterPlan } from "../content/encounters.js";
|
||||
import { normalBattleCount, protectEarlyBattleNodes, WEAK_BATTLE_COUNT } from "./encounter-progress.js";
|
||||
import { grantRelic } from "../relics/definitions.js";
|
||||
|
||||
const hashText = text => {
|
||||
let value = 2166136261;
|
||||
@@ -191,6 +192,9 @@ export const createRun = character => {
|
||||
storyFlags: {},
|
||||
};
|
||||
initializeInnateBonds(run);
|
||||
// Only the currently mapped STS2 character gets its actual starting relic.
|
||||
// Existing saves are not retroactively awarded items.
|
||||
if(character==="mengsan_liubei_shuying")grantRelic(run,"burning_blood");
|
||||
run.map = generateActMap(run, 0);
|
||||
return run;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user