feat: v1 prototype — core game systems #30

Merged
naomi merged 84 commits from feat/prototype into main 2026-03-08 15:53:39 -07:00
Showing only changes of commit 4706f3f7f8 - Show all commits
+6 -2
View File
@@ -366,13 +366,17 @@ gameRouter.get("/load", async (context) => {
let needsBackfill = false;
// Backfill combatPower on saves that predate the field
// Backfill combatPower and baseCost on saves that predate those fields
for (const adventurer of state.adventurers) {
const defaults = DEFAULT_ADVENTURERS.find((d) => d.id === adventurer.id);
if (adventurer.combatPower == null) {
const defaults = DEFAULT_ADVENTURERS.find((d) => d.id === adventurer.id);
adventurer.combatPower = defaults?.combatPower ?? 1;
needsBackfill = true;
}
if (adventurer.baseCost == null) {
adventurer.baseCost = defaults?.baseCost ?? 10;
needsBackfill = true;
}
}
// Backfill equipment on saves that predate the feature