Compare commits

...

8 Commits

Author SHA1 Message Date
timmy
c2d7003511 fix: QA bug sweep — 5 small fixes (closes #95)
1. Memory Leak toast: 'trust draining' → 'compute draining'
2. Harmony tooltip: remove erroneous ×10 multiplier on breakdown rates
3. autoType(): stop inflating totalClicks counter
4. The Pact (late): add pactFlag guard to prevent double-purchase
5. Milestone typo: 'AutoCod' → 'AutoCoder'
2026-04-13 01:43:21 -04:00
ff9c1b1864 Merge pull request 'feat: offline progress calculation (closes #11)' (#94) from feat/offline-progress into main
Some checks failed
Smoke Test / smoke (push) Failing after 4s
2026-04-13 04:34:57 +00:00
9fd70fa942 feat: add offline progress calculation (closes #11)
Some checks failed
Accessibility Checks / a11y-audit (pull_request) Failing after 3s
Smoke Test / smoke (pull_request) Failing after 4s
Saves lastSaveTime timestamp. On load, calculates elapsed time
and awards 50% efficiency production. Shows summary toast.
Min 30 seconds away to trigger.
2026-04-13 04:34:33 +00:00
c714061bd8 fix: load tutorial.js before main.js, remove dead game.js (#92)
Some checks failed
Smoke Test / smoke (push) Failing after 4s
Co-authored-by: Alexander Whitestone <alexander@alexanderwhitestone.com>
Co-committed-by: Alexander Whitestone <alexander@alexanderwhitestone.com>
2026-04-13 03:11:03 +00:00
220fc44c6a fix: Bilbo randomness, drone balance, screen reader (#88, #89, #90) (#93)
Some checks failed
Smoke Test / smoke (push) Failing after 3s
2026-04-13 03:10:39 +00:00
26bb33c5eb QA: Comprehensive Playtest Bug Report (19 issues)
Some checks failed
Smoke Test / smoke (push) Failing after 4s
Merge PR #85: QA: Comprehensive Playtest Bug Report (19 issues)
2026-04-13 03:00:25 +00:00
954a6c4111 Merge pull request 'fix: critical bugs from QA (#86, #87, #89)' (#91) from burn/fix-critical-bugs into main
Some checks failed
Smoke Test / smoke (push) Has been cancelled
Merge PR #91: fix: critical bugs from QA (#86, #87, #89)
2026-04-13 02:56:28 +00:00
Alexander Whitestone
e72e5ee121 fix: critical bugs from QA (#86, #87, #89)
Some checks failed
Accessibility Checks / a11y-audit (pull_request) Failing after 2s
Smoke Test / smoke (pull_request) Failing after 3s
- Deleted dead game.js (duplicate const declarations)
- Fixed Wire Budget double-counting trust cost
2026-04-12 22:52:01 -04:00
6 changed files with 19 additions and 3303 deletions

3288
game.js

File diff suppressed because it is too large Load Diff

View File

@@ -114,7 +114,7 @@ body{background:var(--bg);color:var(--text);font-family:'SF Mono','Cascadia Code
<div class="progress-label"><span id="phase-progress-label">0%</span><span id="phase-progress-target">Next: Phase 2 (2,000 code)</span></div>
<div class="milestone-row" id="milestone-chips"></div>
</div>
<div id="resources" role="region" aria-label="Resources" aria-live="polite">
<div id="resources" role="region" aria-label="Resources" aria-live="off">
<div class="res"><div class="r-label">Code</div><div class="r-val" id="r-code">0</div><div class="r-rate" id="r-code-rate">+0/s</div></div>
<div class="res"><div class="r-label">Compute</div><div class="r-val" id="r-compute">0</div><div class="r-rate" id="r-compute-rate">+0/s</div></div>
<div class="res"><div class="r-label">Knowledge</div><div class="r-val" id="r-knowledge">0</div><div class="r-rate" id="r-knowledge-rate">+0/s</div></div>
@@ -130,7 +130,7 @@ body{background:var(--bg);color:var(--text);font-family:'SF Mono','Cascadia Code
<div class="panel" id="action-panel" role="region" aria-label="Actions">
<h2>ACTIONS</h2>
<div class="action-btn-group"><button class="main-btn" onclick="writeCode()" aria-label="Write code, generates code resource">WRITE CODE</button></div>
<div id="combo-display" role="status" aria-live="polite" style="text-align:center;font-size:10px;color:var(--dim);height:14px;margin-bottom:4px;transition:all 0.2s"></div>
<div id="combo-display" role="status" aria-live="off" style="text-align:center;font-size:10px;color:var(--dim);height:14px;margin-bottom:4px;transition:all 0.2s"></div>
<div id="debuffs" style="display:none;margin-top:8px"></div>
<div class="action-btn-group">
<button class="ops-btn" onclick="doOps('boost_code')" aria-label="Convert 1 ops to code boost">Ops -&gt; Code</button>
@@ -185,11 +185,11 @@ Events Resolved: <span id="st-resolved">0</span>
<h3>SOVEREIGN GUIDANCE (GOFAI)</h3>
<div id="strategy-recommendation" style="font-size:11px;color:var(--gold);font-style:italic">Analyzing system state...</div>
</div>
<div id="log" role="log" aria-label="System Log" aria-live="polite">
<div id="log" role="log" aria-label="System Log" aria-live="off">
<h2>SYSTEM LOG</h2>
<div id="log-entries"></div>
</div>
<div id="save-toast" role="status" aria-live="polite" style="display:none;position:fixed;top:16px;right:16px;background:#0e1420;border:1px solid #2a3a4a;color:#4a9eff;font-size:10px;padding:6px 12px;border-radius:4px;z-index:50;opacity:0;transition:opacity 0.4s;pointer-events:none">Save</div>
<div id="save-toast" role="status" aria-live="off" style="display:none;position:fixed;top:16px;right:16px;background:#0e1420;border:1px solid #2a3a4a;color:#4a9eff;font-size:10px;padding:6px 12px;border-radius:4px;z-index:50;opacity:0;transition:opacity 0.4s;pointer-events:none">Save</div>
<div id="help-btn" onclick="toggleHelp()" style="position:fixed;bottom:16px;right:16px;width:28px;height:28px;background:#0e0e1a;border:1px solid #333;color:#555;font-size:14px;border-radius:50%;cursor:pointer;display:flex;align-items:center;justify-content:center;z-index:50;font-family:inherit;transition:all 0.2s" title="Keyboard shortcuts (?)">?</div>
<div id="help-overlay" onclick="if(event.target===this)toggleHelp()" style="display:none;position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(8,8,16,0.92);z-index:80;justify-content:center;align-items:center;flex-direction:column;padding:40px">
<div style="background:#0e0e1a;border:1px solid #1a3a5a;border-radius:8px;padding:24px 32px;max-width:420px;width:100%">
@@ -230,6 +230,7 @@ The light is on. The room is empty."
<script src="js/sound.js"></script>
<script src="js/engine.js"></script>
<script src="js/render.js"></script>
<script src="js/tutorial.js"></script>
<script src="js/main.js"></script>

View File

@@ -380,7 +380,6 @@ const PDEFS = [
trigger: () => G.compute < 1 && G.totalCode >= 100,
repeatable: true,
effect: () => {
G.trust -= 1;
G.compute += 100 + Math.floor(G.totalCode * 0.1);
log('Budget overage approved. Compute replenished.');
}
@@ -613,7 +612,7 @@ const PDEFS = [
name: 'The Pact',
desc: 'Hardcode: "We build to serve. Never to harm."',
cost: { trust: 100 },
trigger: () => G.totalImpact >= 10000 && G.trust >= 75,
trigger: () => G.totalImpact >= 10000 && G.trust >= 75 && G.pactFlag !== 1,
effect: () => { G.pactFlag = 1; G.impactBoost *= 3; log('The Pact is sealed. The line is drawn and it will not move.'); },
milestone: true
},
@@ -772,7 +771,7 @@ const PDEFS = [
// === MILESTONES ===
const MILESTONES = [
{ flag: 1, msg: "AutoCod available" },
{ flag: 1, msg: "AutoCoder available" },
{ flag: 2, at: () => G.totalCode >= 500, msg: "500 lines of code written" },
{ flag: 3, at: () => G.totalCode >= 2000, msg: "2,000 lines. The auto-coder produces its first output." },
{ flag: 4, at: () => G.totalCode >= 10000, msg: "10,000 lines. The model training begins." },

View File

@@ -96,7 +96,7 @@ function updateRates() {
if (G.swarmFlag === 1) {
const totalBuildings = Object.values(G.buildings).reduce((a, b) => a + b, 0);
const clickPower = getClickPower();
G.swarmRate = totalBuildings * clickPower;
G.swarmRate = totalBuildings * clickPower * 0.01;
G.codeRate += G.swarmRate;
}
@@ -169,6 +169,14 @@ function tick() {
}
G.tick += dt;
// Bilbo randomness: roll once per tick
if (G.buildings.bilbo > 0) {
G.bilboBurstActive = Math.random() < CONFIG.BILBO_BURST_CHANCE;
G.bilboVanishActive = Math.random() < CONFIG.BILBO_VANISH_CHANCE;
} else {
G.bilboBurstActive = false;
G.bilboVanishActive = false;
}
G.playTime += dt;
// Sprint ability
@@ -657,7 +665,7 @@ const EVENTS = [
resolveCost: { resource: 'ops', amount: 100 }
});
log('EVENT: Memory leak in datacenter. Spend 100 ops to patch.', true);
showToast('Memory Leak — trust draining', 'event');
showToast('Memory Leak — compute draining', 'event');
}
},
{
@@ -780,7 +788,6 @@ function autoType() {
const amount = getClickPower() * 0.5; // 50% of manual click
G.code += amount;
G.totalCode += amount;
G.totalClicks++;
// Subtle auto-tick flash on the button
const btn = document.querySelector('.main-btn');
if (btn && !G._autoTypeFlashActive) {
@@ -969,7 +976,7 @@ function renderResources() {
hEl.style.color = G.harmony > 60 ? '#4caf50' : G.harmony > 30 ? '#ffaa00' : '#f44336';
if (G.harmonyBreakdown && G.harmonyBreakdown.length > 0) {
const lines = G.harmonyBreakdown.map(b =>
`${b.label}: ${b.value >= 0 ? '+' : ''}${(b.value * 10).toFixed(1)}/s`
`${b.label}: ${b.value >= 0 ? '+' : ''}${b.value.toFixed(1)}/s`
);
lines.push('---');
lines.push(`Timmy effectiveness: ${Math.floor(Math.max(0.2, Math.min(3, G.harmony / 50)) * 100)}%`);

View File

@@ -206,6 +206,7 @@ function saveGame() {
totalEventsResolved: G.totalEventsResolved || 0,
buyAmount: G.buyAmount || 1,
playTime: G.playTime || 0,
lastSaveTime: Date.now(),
sprintActive: G.sprintActive || false,
sprintTimer: G.sprintTimer || 0,
sprintCooldown: G.sprintCooldown || 0,

View File

@@ -57,10 +57,6 @@ check("js/data.js exists", () => {
if (!existsSync(join(ROOT, "js/data.js"))) throw new Error("Missing");
});
check("game.js exists", () => {
if (!existsSync(join(ROOT, "game.js"))) throw new Error("Missing");
});
// 4. No banned providers
console.log("\n[Policy]");
check("No Anthropic references", () => {