
| Topic | Description |
|---|---|
| The Core Mission | The goal is to balance collective duty (Integrity Score) with individual sacrifice (Lumen Score). |
| Integrity Score ($S$) | The Collective Health of the system. Maintained through daily acts of Generosity (donating Relief Signals). System decay lowers $S$ by 2 per turn, and low $S$ leads to systemic Blights. |
| Lumen Score ($L$) | Your Personal Moral Growth. Increased through high-cost, high-impact Intervention Protocols (Compassionate Mercy). |
| Currencies | Relief Signals (standard currency) and Empathy Cores ($\mathcal{E}$) (rare currency for protocols). |
Comparison of Intervention Protocols
The core moral choice for the player is the activation of an Intervention Protocol using the rare Empathy Core ($\mathcal{E}$). The documents detail two distinct protocols:
| Protocol | Lesson Taught | Cost | Integrity ($S$) Reward | Lumen ($L$) Reward |
|---|---|---|---|---|
| Compassionate Grace | Sacrifice (Emptying oneself) | 1 $\mathcal{E}$ AND ALL Relief Signals | MAX (+5) | MAX (+150) |
| Mercy Grace | Pardon (Unearned forgiveness) | 1 $\mathcal{E}$ ONLY (Keep Relief) | MODERATE (+3) | MODERATE (+75) |
Documents Overview
The folder contains the following development files:
- The Matrix of Consciousness .txt (HTML/CSS): This file contains the marketing and mechanics breakdown for the game. It uses a "Matrix" theme with "Matrix Green" text on black background and introduces the Dual Score ($S$ and $L$) and the two Intervention Protocols. It's essentially the front-end landing page design.
- App.js and App.js.txt (JavaScript): These two files are identical copies of the core game logic. They define the initial game state (
integrity: 10,lumen: 0,empathy: 3,relief: 100,turn: 1) and implement the core actions:donate: Reduces Relief by 10, increases Integrity ($S$) by 1.compassion: Reduces Empathy ($\mathcal{E}$) by 1, sets Relief to 0, increases Integrity ($S$) by 5, and Lumen ($L$) by 150.mercy: Reduces Empathy ($\mathcal{E}$) by 1, keeps Relief, increases Integrity ($S$) by 3, and Lumen ($L$) by 75.endTurn: Reduces Integrity ($S$) by 2 (System Decay), increases Relief by 20 (Resource Generation), and increments the turn counter.
- Index.ja (Google Doc): This file is empty, but its Japanese title extension suggests it may be a placeholder for localization or a related Japanese index.
// --- GAME STATE ---
// Tracks the core metrics described in your design
let state = {
integrity: 10, // $S$: Collective Health
lumen: 0, // $L$: Personal Moral Growth
empathy: 3, // $\mathcal{E}$: Rare currency for protocols
relief: 100, // Standard currency for donations
turn: 1
};
// --- CORE FUNCTIONS ---
// 1. Start the Game
function startGame() {
// Hide the landing page
document.getElementById('main-content').style.display = 'none';
// Show the active game interface
document.getElementById('game-interface').style.display = 'block';
window.scrollTo(0,0);
log("System initialized. Welcome to the Matrix of Consciousness.");
log("Cycle 1 began. integrity is stable.");
updateDisplay();
}
// 2. Return to Main Menu
function showHome() {
document.getElementById('main-content').style.display = 'block';
document.getElementById('game-interface').style.display = 'none';
window.scrollTo(0,0);
}
// 3. Update the Screen (HUD)
function updateDisplay() {
// Updates the HTML numbers to match the Javascript state
document.getElementById('score-s').innerText = state.integrity;
document.getElementById('score-l').innerText = state.lumen;
document.getElementById('score-e').innerText = state.empathy;
document.getElementById('score-r').innerText = state.relief;
document.getElementById('turn-counter').innerText = state.turn;
// Visual warning if Integrity is low
const integrityBox = document.getElementById('stat-box-s');
if (state.integrity <= 3) {
integrityBox.style.color = '#ff3333';
integrityBox.style.borderColor = '#ff3333';
} else {
integrityBox.style.color = '#fff';
integrityBox.style.borderColor = '#00ff66';
}
}
// 4. Log Messages to the Console Box
function log(message, type = 'normal') {
const consoleEl = document.getElementById('game-log');
const entry = document.createElement('div');
// Add classes for color (e.g., red for alerts, green for success)
entry.className = 'log-entry ' + type;
entry.innerText = `> [CYCLE ${state.turn}] ${message}`;
// Add new message to the top
consoleEl.prepend(entry);
}
// --- ACTIONS (BUTTON CLICKS) ---
function performAction(action) {
if (state.integrity <= 0) {
log("SYSTEM FAILED. Refresh to restart.", "alert");
return;
}
if (action === 'donate') {
// MECHANIC: Generosity
// Cost: 10 Relief | Reward: +1 Integrity
if (state.relief >= 10) {
state.relief -= 10;
state.integrity += 1;
log("Relief Signal donated. System stability stabilized.", "success");
} else {
log("Action Failed: Insufficient Relief Signals.", "alert");
}
}
else if (action === 'compassion') {
// MECHANIC: Compassionate Grace
// Cost: 1 Empathy + ALL Relief | Reward: +5 Integrity, +150 Lumen
if (state.empathy >= 1) {
state.empathy -= 1;
const sacrificed = state.relief;
state.relief = 0; // The "Emptying Oneself" mechanic
state.integrity += 5;
state.lumen += 150;
log(`PROTOCOL ACTIVATED: Compassion. Sacrificed ${sacrificed} Relief Signals.`, "success");
log("Moral Growth (Lumen) significantly increased.", "success");
} else {
log("Action Failed: Insufficient Empathy Cores.", "alert");
}
}
else if (action === 'mercy') {
// MECHANIC: Mercy Grace
// Cost: 1 Empathy | Reward: +3 Integrity, +75 Lumen
if (state.empathy >= 1) {
state.empathy -= 1;
state.integrity += 3;
state.lumen += 75;
log("PROTOCOL ACTIVATED: Mercy. Authority exercised.", "success");
} else {
log("Action Failed: Insufficient Empathy Cores.", "alert");
}
}
updateDisplay();
}
function endTurn() {
if (state.integrity <= 0) return;
// MECHANIC: System Decay
state.integrity -= 2;
state.turn += 1;
// MECHANIC: Resource Generation
const reliefGenerated = 20;
state.relief += reliefGenerated;
if (state.integrity <= 0) {
state.integrity = 0;
log("CRITICAL FAILURE. System Integrity has collapsed.", "alert");
log("GAME OVER.", "alert");
} else {
log(`Cycle ended. Integrity decayed (-2). Generated +${reliefGenerated} Relief.`);
if (state.integrity <= 3) {
log("WARNING: System Integrity Critical.", "alert");
}
}
updateDisplay();
}
console.log("App.js loaded successfully");
by MoringaTeas