diff --git a/index.html b/index.html index f64c100..72feb56 100644 --- a/index.html +++ b/index.html @@ -1,4034 +1,11699 @@ - - - - - - - RobCo Strategic Simulation (Fallout Risk) - - - -
-
[ SYSTEM ALERT ]
-
TERMINAL ORIENTATION UNSTABLE.

PLEASE ROTATE DEVICE TO
LANDSCAPE MODE TO INITIATE.
-
-
- -
-
-

ROBCO OS v1.9

- -
- - -
- -
- -
- - | -
-
- -
-
- -
- - | -
-
-
- - -
-
- -
- - -
- -
- - - - - - - - - - - -
- - -
-
-
- ☢ LAUNCH CODE FRAGMENT RECOVERED ☢ -
- - - - - - - - - - - - - - - - -
-
-

ROBCO STRAT-COMv1.9

-
-
- -
- MILITARY STRENGTH
- ACTION POINTS (AP)
-
- - - - - -
- -
-
-
- -
-

AVAILABLE REINFORCEMENTS

-
2
-
-
- -
-
-
Bottle Caps 0
- -
-
- - -
-
- -
- -
- STAT - INV - DATA - MAP - RADIO -
-
-
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - style="overflow:visible"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - I n d i a n O c e a n - - - -
- -
-
Vault-Tec Action Log
-
-
- - - - - - - - - - -
-
Reinforcements:
-
Reinforcements:
-
Reinforcements:
-
Reinforcements:
-
Reinforcements:
-
Reinforcements:
-
Reinforcements:
- - - -
- - - - - - - \ No newline at end of file + return `
+> TERMINAL OVERRIDE: CORE LOGIC ACCESS
+Toggles lit in green are ACTIVE. Dimmed buttons require a disabled mechanic.

+ +
+RESOURCE INJECTION +
+${isClassic + ? b('+1 WILD CARD', "if(!Gamestate.player.cards)Gamestate.player.cards=[];Gamestate.player.cards.push({country:'INJECTION',type:'Wild'});Gamestate.updateInfo();Gamestate.showToast('+1 WILD CARD','var(--pip-color)');"+R) + : b('+25 CAPS', "Gamestate.player.caps+=25;Gamestate.updateInfo();Gamestate.showToast('+25 CAPS','var(--pip-color)');"+R)} +${b('+50 TROOPS', "Gamestate.player.reserve+=50;Gamestate.player.army+=50;Gamestate.updateInfo();Gamestate.showToast('+50 TROOPS','var(--pip-color)');"+R)} +${b('+1 STIMPAK', "if(Gamestate.player.commander){Gamestate.player.commander.stimpaks++;Gamestate.updateInfo();Gamestate.showToast('+1 STIMPAK','var(--pip-color)');"+R+"}else{Gamestate.showToast('No Commander','#ff4444');}", cmdrOn ? '' : 'off')} +${b('+1 LAUNCH CODE', "Gamestate.player.codes=Math.min(4,(Gamestate.player.codes||0)+1);Gamestate.updateInfo();Gamestate.showToast('+1 CODE','var(--pip-color)');"+R, nukeOn ? '' : 'off')} +
+
+ +
+COMMANDER CONTROLS +
+${b('HEAL VIP (100%)', "Gamestate.player.commander.hp=100;Gamestate.updateInfo();Gamestate.showToast('VIP HEALED','var(--pip-color)');"+R, cmdrOn ? '' : 'off')} +${b('RESET AP (2)', "Gamestate.player.commander.ap=2;Gamestate.player.commander.hasFought=false;Gamestate.updateInfo();Gamestate.showToast('AP RESET','var(--pip-color)');"+R, cmdrOn ? '' : 'off')} +
+
+ +
+SIMULATION OVERRIDES +
+${b(godActive ? 'GOD MODE' : 'GOD MODE', "Gamestate.invincible=!Gamestate.invincible;"+R, godActive ? 'on' : '')} +${b(ignActive ? 'SKIP AI TURNS': 'SKIP AI TURNS', "Gamestate.godMode=!Gamestate.godMode;"+R, ignActive ? 'on' : '')} +${b(fogLiftActive? 'FOG LIFT' : 'FOG LIFT', "Gamestate.devFogLifted=!Gamestate.devFogLifted;Gamestate.fogLifted=Gamestate.devFogLifted?9999:0;if(Gamestate.drawMap)Gamestate.drawMap();Gamestate.updateInfo();"+R, fogOn ? (fogLiftActive ? 'on' : '') : 'off')} +${b('FORCE ENCOUNTER', "if(Gamestate.resolveCreatureEncounter)Gamestate.resolveCreatureEncounter();else Gamestate.showToast('No Encounter Fn','#ff4444');"+R, encOn ? '' : 'off')} +${b(hasStorm ? 'CLEAR STORM' : 'TRIGGER STORM', hasStorm ? "Gamestate.activeRadstorm=null;Gamestate.activeStorm=null;Gamestate.radstormTurns=0;Gamestate.updateInfo();"+R : "if(Gamestate.triggerRadstorm)Gamestate.triggerRadstorm();Gamestate.showToast('STORM TRIGGERED','#ff6600');"+R, stormOn ? '' : 'off')} +${b('SKIP THIS AI TURN', "if(Gamestate.aiTurn){Gamestate.aiTurn=false;let m=document.getElementById('map');if(m)m.style.pointerEvents='auto';Gamestate.updateInfo();Gamestate.showToast('AI TURN SKIPPED','var(--pip-color)');"+R+"}else{Gamestate.showToast('Not AI turn','#ff4444');}")} +
+
+${b('+5 REP ALL', "if(hasDiplomacy||Gamestate.diplomacy){let rep=Gamestate.diplomacy.reputation;let pn=Gamestate.player.name;if(rep&&rep[pn]){Object.keys(rep[pn]).forEach(k=>{rep[pn][k]=Math.min(100,rep[pn][k]+5);});Gamestate.showToast('+5 REP with all factions','var(--pip-color)');"+R+"}else{Gamestate.showToast('No rep data','#ff4444');}}", hasDiplomacy ? '' : 'off')} +${b('ELIMINATE ALL AI', "if(confirm('WARNING: Eliminate all AI factions? This cannot be undone.')){Gamestate.players.forEach(function(pl){if(pl!==Gamestate.player&&pl.alive&&!pl.isNeutral){pl.alive=false;pl.areas.forEach(function(a){let c=Gamestate.countries.find(x=>x.name===a);if(c){c.owner=Gamestate.player.name;c.army=1;}});pl.areas=[];}});if(Gamestate.updateInfo)Gamestate.updateInfo();Gamestate.showToast('ALL AI ELIMINATED','#ff4444');"+R+"}")} +
+
+ +${bhHTML} + +
+SYSTEM PREFERENCES +
VATS WIN%: ${(Gamestate.devWinOverride != null && Gamestate.devWinOverride !== -1) ? Gamestate.devWinOverride+'%' : 'AUTO'}
+
THEME:
+
+ + +
+[ ROBCO INDUSTRIES UNIFIED OPERATING SYSTEM - SYSTEM DIAGNOSTICS DASHBOARD ]
+${(() => { + const s = Gamestate.getSystemStats(); + return ` +
+
OS: ${s.os}
PLATFORM: ${s.platform}
+
BROWSER: ${s.browser}
DPI: ${window.devicePixelRatio}x
+
UA: ${s.ua}
+
CPU CORES: ${s.cores}
APPROX. RAM: ${s.ram}
+
RESOLUTION: ${s.res}
COLOR DEPTH: ${s.depth}
+
GPU: ${s.gpu}
+
NET TYPE: ${s.netType}
LATENCY (RTT): ${s.netLat}
+
BATTERY: ${s.bat}${s.charging}
TIME: ${new Date().toLocaleTimeString()}
+
+
+ SIMULATION: STAGE: ${Gamestate.stage||'IDLE'} | TURN: ${Gamestate.turn||'0'} | PRESET: ${Gamestate.presetName||'CUSTOM'} +
`; +})()} +
`; +}, + + }; + +let currentFullContent = ""; // Stores text for the "Instant Skip" + +function typeOutHelpText(pageId) { + window.typeOutHelpText = typeOutHelpText; // Ensure global access for onclicks + let screen = document.getElementById("help-os-screen"); + if (!screen) return; + + let content = typeof helpPages[pageId] === 'function' ? helpPages[pageId]() : helpPages[pageId]; + if (helpTypingInterval) clearInterval(helpTypingInterval); + + // --- UPDATED: Always show the background art on every page --- + let rootArt = document.getElementById("help-root-art"); + if (rootArt) { + rootArt.style.display = "block"; + } + // ------------------------------------------------------------- + + if (pageId !== "page-root") { + content += '

---------------------------------------
> ROOT'; + } + + currentFullContent = content; + screen.innerHTML = ""; + let i = 0; + let currentHTML = ""; + + helpTypingInterval = setInterval(() => { + if (i < content.length) { + while (i < content.length && (content.charAt(i) === '<' || content.charAt(i) === '&')) { + if (content.charAt(i) === '<') { + let tagEnd = content.indexOf('>', i); + if (tagEnd !== -1) { currentHTML += content.substring(i, tagEnd + 1); i = tagEnd + 1; } + else { break; } + } else if (content.charAt(i) === '&') { + let entEnd = content.indexOf(';', i); + if (entEnd !== -1 && (entEnd - i) < 10) { currentHTML += content.substring(i, entEnd + 1); i = entEnd + 1; } + else { break; } + } + } + if (i < content.length) { + currentHTML += content.charAt(i); + i++; + screen.innerHTML = currentHTML + ''; + } else { finishTypingInstantly(); } + } else { finishTypingInstantly(); } + }, 10); +} + +function finishTypingInstantly() { + if (helpTypingInterval) { + clearInterval(helpTypingInterval); + helpTypingInterval = null; + } + let screen = document.getElementById("help-os-screen"); + let finalHTML = currentFullContent.trimEnd(); + if (finalHTML.endsWith('')) { + screen.innerHTML = finalHTML.slice(0, -7) + '_'; + } else { + screen.innerHTML = finalHTML + '_'; + } +} + +document.getElementById('help-os-screen').addEventListener('click', function(e) { + if (helpTypingInterval) { + e.stopPropagation(); + finishTypingInstantly(); + } +}); + + // Click listener for the terminal + document.addEventListener('click', function(e) { + if (e.target && e.target.classList.contains('help-nav-item')) { + // New Log Off Logic + if (e.target.id === "logoff-guide-btn") { + document.getElementById('help-modal').style.display = 'none'; + if (helpTypingInterval) clearInterval(helpTypingInterval); + return; + } + + let pageId = e.target.getAttribute('data-page'); + if(pageId) typeOutHelpText(pageId); + } + + // Back Button Logic + if (e.target && e.target.id === 'help-os-back') { + typeOutHelpText("page-root"); + } + }); + + // Cleanly re-bind the original help button to type out the root menu + let originalHelpBtn = document.getElementById('help-btn'); + if (originalHelpBtn) { + // Remove old listeners by cloning the button (prevents old logic from firing) + let newHelpBtn = originalHelpBtn.cloneNode(true); + originalHelpBtn.parentNode.replaceChild(newHelpBtn, originalHelpBtn); + + newHelpBtn.addEventListener('click', () => { + document.getElementById('help-modal').style.display = 'flex'; + typeOutHelpText("page-root"); + }); + } + + // Then boot the game! + Gamestate.init(); + + + +