fixed # 新增羁绊系统

fixed # 新增遗物系统
fixed # 梦三模式下移除护甲上限限制
This commit is contained in:
2026-09-30 14:33:17 +08:00
parent f2da9bce65
commit 82d80397b6
45 changed files with 2403 additions and 130 deletions
+6
View File
@@ -1,3 +1,5 @@
import { meetBond } from "../bonds/state.js";
export const getAvailableStoryChoices = (run, content) => {
const flags = run.storyFlags || {};
return (content?.choices || []).filter(choice => {
@@ -9,5 +11,9 @@ export const getAvailableStoryChoices = (run, content) => {
export const applyStoryOutcome = (run, outcome = {}) => {
if (!run.storyFlags) run.storyFlags = {};
Object.assign(run.storyFlags, outcome.flags || {});
for (const bond of outcome.bonds || []) {
meetBond(run, typeof bond === "string" ? bond : bond.id,
typeof bond === "string" ? 1 : bond.level ?? 1);
}
return outcome;
};