fixed # 修复大量BUG

This commit is contained in:
2026-11-22 17:36:42 +08:00
parent 9c3687fe7f
commit f955716c97
29 changed files with 934 additions and 319 deletions
+2 -1
View File
@@ -74,6 +74,7 @@ const persistModeStorage = (update = () => {}, context = {}) => {
receipt.phase = "mutator";
update(storage);
stripBattleProgress(storage[config.saveKey]);
migrateRetiredCards(storage[config.saveKey]);
storage.version = lib.version;
await writeModeStorage(storage, receipt);
receipt.phase = "memory.publish";
@@ -99,7 +100,7 @@ const persistModeStorage = (update = () => {}, context = {}) => {
const saveRun = async run => {
try {
// Capture before enqueue: subsequent gameplay mutations cannot alter this save.
const snapshot = migrateRetiredCards(stripBattleProgress(copy(run)));
const snapshot = copy(run);
await persistModeStorage(storage => {
storage[config.saveKey] = snapshot;
}, { runId: snapshot.runId, revision: snapshot.revision });