Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ Build your architecture using the toolbar. All 26 services are organized into fi
- **Base Upkeep:** Each service has per-minute upkeep costs
- **Upkeep Scaling:** Costs increase 1x to 2x over 10 minutes
- **Repair Costs:** 15% of service cost to manually repair
- **Auto-Repair:** +10% upkeep overhead when enabled
- **Auto-Repair:** 10% of each service's build cost per minute while enabled (Survival only)

### Survival Mode

Expand Down
2 changes: 1 addition & 1 deletion src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -878,7 +878,7 @@ export const CONFIG = {
criticalHealth: 40, // Higher threshold for critical state
repairCostPercent: 0.15, // 15% of service cost to repair
autoRepairEnabled: false, // Auto-repair toggle (user can enable)
autoRepairCostPercent: 0.1, // 10% additional upkeep when auto-repair enabled
autoRepairCostPercent: 0.1, // 10% of total build cost per minute while auto-repair is on
autoRepairRate: 2, // Health points per second when idle
},

Expand Down
2 changes: 1 addition & 1 deletion src/core/economy.js
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ function getAutoRepairUpkeep() {
if (STATE.gameMode !== "survival") return 0;

const percent = CONFIG.survival.degradation?.autoRepairCostPercent || 0.1;
// 10% of total service cost per second
// 10% of total service build cost per minute, returned per second
const totalServiceCost = STATE.services.reduce(
(sum, s) => sum + s.config.cost,
0
Expand Down
6 changes: 6 additions & 0 deletions tests/readme-claims.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -168,5 +168,11 @@ describe("the README's numbers are the game's numbers", () => {

expect(num(/Repair Costs:\*\* (\d+)% of service cost/, "manual repair") / 100)
.toBeCloseTo(CONFIG.survival.degradation.repairCostPercent, 10);

// getAutoRepairUpkeep() bills a share of the BUILD cost every minute,
// not a share of upkeep: the README once said "+10% upkeep overhead",
// which undercounts the real charge more than sixfold on a $325 board.
expect(num(/Auto-Repair:\*\* (\d+)% of each service's build cost per minute/, "auto-repair") / 100)
.toBeCloseTo(CONFIG.survival.degradation.autoRepairCostPercent, 10);
});
});
Loading