diff --git a/game.js b/game.js index f8acf9a..8659032 100644 --- a/game.js +++ b/game.js @@ -1688,35 +1688,36 @@ function showClickNumber(amount, comboMult) { setTimeout(() => { if (el.parentNode) el.remove(); }, 700); } -function doOps(action) { - if (G.ops < 5) { - log('Not enough Operations. Build Ops generators or wait.'); +function doOps(action, cost) { + cost = cost || 5; + if (G.ops < cost) { + log(`Not enough Operations. Need ${cost}, have ${fmt(G.ops)}.`); return; } - G.ops -= 5; - const bonus = 10; + G.ops -= cost; + const scale = cost / 5; // multiplier relative to base 5-ops cost switch (action) { case 'boost_code': - const c = bonus * 100 * G.codeBoost; + const c = 10 * 100 * G.codeBoost * scale; G.code += c; G.totalCode += c; - log(`Ops -> +${fmt(c)} code`); + log(`Ops(${cost}) -> +${fmt(c)} code`); break; case 'boost_compute': - const cm = bonus * 50 * G.computeBoost; + const cm = 10 * 50 * G.computeBoost * scale; G.compute += cm; G.totalCompute += cm; - log(`Ops -> +${fmt(cm)} compute`); + log(`Ops(${cost}) -> +${fmt(cm)} compute`); break; case 'boost_knowledge': - const km = bonus * 25 * G.knowledgeBoost; + const km = 10 * 25 * G.knowledgeBoost * scale; G.knowledge += km; G.totalKnowledge += km; - log(`Ops -> +${fmt(km)} knowledge`); + log(`Ops(${cost}) -> +${fmt(km)} knowledge`); break; case 'boost_trust': - const tm = bonus * 5; + const tm = 10 * 5 * scale; G.trust += tm; - log(`Ops -> +${fmt(tm)} trust`); + log(`Ops(${cost}) -> +${fmt(tm)} trust`); break; } @@ -2210,6 +2211,13 @@ function renderDebuffs() { container.innerHTML = html; } +function renderBulkOps() { + const row = document.getElementById('bulk-ops-row'); + if (row) { + row.style.display = G.maxOps >= 100 ? 'flex' : 'none'; + } +} + function renderSprint() { const container = document.getElementById('sprint-container'); const btn = document.getElementById('sprint-btn'); @@ -2378,6 +2386,7 @@ function render() { renderCombo(); renderDebuffs(); renderSprint(); + renderBulkOps(); renderPulse(); } @@ -2747,10 +2756,14 @@ window.addEventListener('keydown', function (e) { writeCode(); } if (e.target !== document.body) return; - if (e.code === 'Digit1') doOps('boost_code'); - if (e.code === 'Digit2') doOps('boost_compute'); - if (e.code === 'Digit3') doOps('boost_knowledge'); - if (e.code === 'Digit4') doOps('boost_trust'); + if (e.code === 'Digit1' && !e.shiftKey) doOps('boost_code'); + if (e.code === 'Digit2' && !e.shiftKey) doOps('boost_compute'); + if (e.code === 'Digit3' && !e.shiftKey) doOps('boost_knowledge'); + if (e.code === 'Digit4' && !e.shiftKey) doOps('boost_trust'); + // Shift+1/2/3 = bulk ops (50x) + if (e.code === 'Digit1' && e.shiftKey) doOps('boost_code', 50); + if (e.code === 'Digit2' && e.shiftKey) doOps('boost_compute', 50); + if (e.code === 'Digit3' && e.shiftKey) doOps('boost_knowledge', 50); if (e.code === 'KeyB') { // Cycle: 1 -> 10 -> MAX -> 1 if (G.buyAmount === 1) setBuyAmount(10); diff --git a/index.html b/index.html index f6f9551..8876f80 100644 --- a/index.html +++ b/index.html @@ -140,6 +140,11 @@ body{background:var(--bg);color:var(--text);font-family:'SF Mono','Cascadia Code +