diff --git a/apps/api/src/routes/game.ts b/apps/api/src/routes/game.ts index 9360c70..ff41c3b 100644 --- a/apps/api/src/routes/game.ts +++ b/apps/api/src/routes/game.ts @@ -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