Compare commits
8 Commits
qa/playtes
...
sprint/iss
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c2d7003511 | ||
| ff9c1b1864 | |||
| 9fd70fa942 | |||
| c714061bd8 | |||
| 220fc44c6a | |||
| 26bb33c5eb | |||
| 954a6c4111 | |||
|
|
e72e5ee121 |
@@ -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 -> 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>
|
||||
|
||||
|
||||
|
||||
@@ -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." },
|
||||
|
||||
15
js/engine.js
15
js/engine.js
@@ -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)}%`);
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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", () => {
|
||||
|
||||
Reference in New Issue
Block a user