/* ================================================================= DTIM-ZEC MARS MISSION: COMPLETE MASTER CODE (NO-SCROLL FIX) Jan Bühring Modell - Processing.js Web-Kompatibel Sequence: stage 0 (Spammer) -> stage 1 (Bau) -> stage 2 (Transit) -> stage 3 (Mars) ================================================================= */ /* ========================================================== MIT License von Jan Bühring & Gimini Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Impressum: Jan Buehring Adress Zusatz: Frida-Buecker-Haus Loeningstr. 25-26 28195 Bremen Deutschland Email: jan@jan-buehring.de ========================================================== */ int stage = 0; // ================================================================= // STAGE 0 VARIABLES // ================================================================= float money = 0.0; int contactsCount = 0; float viralMultiplier = 1.0; int pythonBots = 0; float pythonPrice = 30.0; int geminiAIs = 0; float geminiPrice = 150.0; int recipientClass = 0; ArrayList stage0Logs; float clickPulse0 = 0.0; // ================================================================= // STAGE 1 VARIABLES // ================================================================= int rawMaterials = 0; int researchers = 0; boolean part1Built = false, part2Built = false, part3Built = false, part4Built = false; ArrayList stage1Logs; // ================================================================= // STAGE 2 VARIABLES // ================================================================= float zeit = 0; float starshipX = 140, starshipY = 240; float[] qX = new float[4]; float[] qY = new float[4]; float[] qSpeed = new float[4]; float[] sX = new float[3]; float[] sY = new float[3]; float[] sSpeed = new float[3]; float schockX = 0, schockY = 0, schockRadius = 0, schockIntensitaet = 0; int ladung = 0, score = 0, schild = 3; boolean gameOver = false, sieg = false; boolean kiGelernt = false, kiPopupOffen = false, bechzahlFeldAktiv = false, autoAim = false; // ================================================================= // STAGE 3 VARIABLES // ================================================================= int zecEnergyWatts = 50; float marsPressure = 6.0; float marsTemp = -63.0; float marsWater = 0.5; int dipolNodes = 0; int bechResonators = 0; int regolithExtractors = 0; boolean marsTerraformed = false; // ================================================================= // SETUP & MAIN DRAW // ================================================================= void setup() { size(1100, 750); stage0Logs = new ArrayList(); addStage0Log("SYSTEM: DTIM-ZEC Node V2.0 online."); addStage0Log("INFO: Starte Lokale Kontaktaufnahme..."); stage1Logs = new ArrayList(); addStage1Log("SYSTEM: DTIM-ZEC Werft-Terminal online."); initStage2(); } void initStage2() { starshipX = 140; starshipY = 240; ladung = 0; score = 0; schild = 3; gameOver = false; sieg = false; kiGelernt = false; kiPopupOffen = false; bechzahlFeldAktiv = false; autoAim = false; for (int i = 0; i < 4; i++) { qX[i] = width + random(50, 400 + i*100); qY[i] = random(80, 420); qSpeed[i] = random(1.0, 1.5); } for (int i = 0; i < 3; i++) { sX[i] = width + random(200, 600 + i*150); sY[i] = random(80, 420); sSpeed[i] = random(1.2, 1.8); } } void draw() { background(10, 12, 18); if (stage == 0) drawStage0_Spammer(); else if (stage == 1) drawStage1_Bau(); else if (stage == 2) drawStage2_Transit(); else if (stage == 3) drawStage3_Mars(); } // ================================================================= // STAGE 0: SPAMMER // ================================================================= void drawStage0_Spammer() { if (frameCount % 120 == 0 && pythonBots > 0) contactsCount += pythonBots; if (frameCount % 60 == 0) { if (geminiAIs > 0) money += geminiAIs * 3.50 * viralMultiplier; if (recipientClass == 0 && viralMultiplier > 1.0) contactsCount += (int)(viralMultiplier * 0.8); } fill(18, 24, 36); stroke(0, 180, 255, 80); strokeWeight(1.5); rect(20, 20, width - 40, 70, 8); fill(0, 220, 255); textSize(13); textAlign(LEFT, CENTER); text("KONTOSTAND:", 40, 45); fill(0, 255, 150); textSize(20); text(nf(money, 1, 2) + " €", 145, 44); fill(0, 220, 255); textSize(13); text("REICHWEITE / KONTAKTE:", 300, 45); fill(255, 200, 0); textSize(18); text(contactsCount + " Adressen", 475, 44); float btnX = 40, btnY = 110, btnW = 380, btnH = 150; if (clickPulse0 > 0) clickPulse0 -= 0.1; fill(18, 28, 45); stroke(0, 200, 255, 150 + clickPulse0 * 100); strokeWeight(2 + clickPulse0 * 2); rect(btnX, btnY, btnW, btnH, 12); fill(0, 220, 255); textAlign(CENTER, CENTER); textSize(17); text("✉️ MAIL ABSENDEN ✉️", btnX + btnW/2, btnY + 45); fill(200); textSize(11); text("(Klicken oder LEERTASTE)", btnX + btnW/2, btnY + 75); fill(0, 255, 180); textSize(12); text("+1 bis 2 Adressen | Chance auf JACKPOT!", btnX + btnW/2, btnY + 115); fill(15, 20, 30); stroke(40, 50, 70); rect(40, 280, 380, 140, 8); fill(0, 180, 255); textSize(12); textAlign(LEFT, TOP); text("EMPFÄNGER-KLASSE WÄHLEN:", 55, 292); drawClassBtn(55, 315, 350, 28, "1. Hilfseinrichtung (+Virales Marketing)", recipientClass == 0); drawClassBtn(55, 348, 350, 28, "2. Physik-Professoren (+Hohe Spenden)", recipientClass == 1); drawClassBtn(55, 381, 350, 28, "3. Science-Blogs & Presse (+Reichweite)", recipientClass == 2); float shopX = 440, shopY = 110, shopW = 620; fill(15, 20, 30); stroke(40, 50, 70); rect(shopX, shopY, shopW, 310, 10); fill(0, 180, 255); textSize(14); textAlign(LEFT, TOP); text("AUTOMATISIERUNG", shopX + 20, shopY + 15); drawShopBtn(shopX + 20, shopY + 45, shopW - 40, 75, "Python Address-Scraper", "Sammelt langsam Adressen im Netz.", pythonPrice, "Aktiv: " + pythonBots, money >= pythonPrice); drawShopBtn(shopX + 20, shopY + 130, shopW - 40, 75, "Gemini Auto-Mail AI", "Verfasst Mails & erzeugt Spenden.", geminiPrice, "Aktiv: " + geminiAIs, money >= geminiPrice); if (contactsCount >= 100 || money >= 200.0) { fill(0, 200, 120); rect(shopX + 20, shopY + 220, shopW - 40, 70, 8); fill(10); textSize(15); textAlign(CENTER, CENTER); text("🚀 DURCHBRUCH ERREICHT!\nWECHSEL ZUM RAUMSCHIFF-BAU (STAGE 1) ➔", shopX + shopW/2, shopY + 255); } fill(8, 12, 16); stroke(0, 180, 255, 60); rect(40, 440, 1020, 280, 8); fill(0, 180, 255); textSize(11); textAlign(LEFT, TOP); text("LIVE MAIL-LOGS", 55, 450); textSize(10); for (int i = 0; i < stage0Logs.size(); i++) { fill(120, 160, 180); text((String)stage0Logs.get(i), 55, 474 + i * 19); } } void addStage0Log(String txt) { stage0Logs.add("[" + nf(hour(),2) + ":" + nf(minute(),2) + "] " + txt); if (stage0Logs.size() > 12) stage0Logs.remove(0); } // ================================================================= // STAGE 1: BAUMODUS // ================================================================= void drawStage1_Bau() { if (frameCount % 90 == 0 && researchers > 0) rawMaterials += researchers * 2; fill(18, 24, 36); stroke(0, 180, 255, 80); rect(20, 20, width - 40, 70, 8); fill(0, 220, 255); textSize(13); textAlign(LEFT, CENTER); text("FORSCHER IM TEAM:", 40, 45); fill(0, 255, 150); textSize(20); text(researchers + " Mann", 185, 44); fill(0, 220, 255); textSize(13); text("ROHSTOFFE (TITAN / ZEC-KNOTEN):", 420, 45); fill(255, 200, 0); textSize(20); text(rawMaterials + " u", 665, 44); fill(18, 28, 45); stroke(0, 200, 255); rect(40, 110, 380, 140, 12); fill(0, 220, 255); textAlign(CENTER, CENTER); textSize(17); text("✉️ MAILS VERSCHICKEN ✉️", 230, 150); fill(0, 255, 180); textSize(12); text("Anwerben von Forschern & Rohstoffen", 230, 215); float x = 440, y = 110, w = 620; fill(15, 20, 30); stroke(40, 50, 70); rect(x, y, w, 420, 10); fill(0, 180, 255); textSize(14); textAlign(LEFT, TOP); text("SCHIFFSBAU-MONTAGERAUM (ZEC-1 ENDEAVOUR)", x + 20, y + 15); drawPartBtn(x + 20, y + 45, w - 40, 75, "1. ZEC-Quanten-Reaktor", "Liefert die 120°-Spannung für die Raumkrümmung.", 150, part1Built); drawPartBtn(x + 20, y + 130, w - 40, 75, "2. Hexagonales Waben-Chassis", "3D-Rumpf aus Graph-verstärktem Titan.", 350, part2Built); drawPartBtn(x + 20, y + 215, w - 40, 75, "3. Photonen-Laser & Schild", "Abwehr von Mikrometeoriten im Transit.", 600, part3Built); drawPartBtn(x + 20, y + 300, w - 40, 75, "4. KI-Navigations-Brücke", "Berechnet die Adjazenzmatrix in Echtzeit.", 1000, part4Built); fill(8, 12, 16); stroke(0, 180, 255, 60); rect(40, 540, 1020, 180, 8); fill(0, 180, 255); textSize(11); textAlign(LEFT, TOP); text("WERFT-LOGBUCH", 55, 548); textSize(10); for (int i = 0; i < stage1Logs.size(); i++) { fill(120, 160, 180); text((String)stage1Logs.get(i), 55, 568 + i * 16); } if (part1Built && part2Built && part3Built && part4Built) { fill(0, 200, 120); rect(x + 20, y + 360, w - 40, 50, 8); fill(10); textSize(16); textAlign(CENTER, CENTER); text("🚀 ALLE MODULE MONTIERT! ZÜNDUNG & TRANSIT (STAGE 2) ➔", x + w/2, y + 385); } } void addStage1Log(String txt) { stage1Logs.add("[" + nf(hour(),2) + ":" + nf(minute(),2) + "] " + txt); if (stage1Logs.size() > 9) stage1Logs.remove(0); } // ================================================================= // STAGE 2: TRANSIT FLUG // ================================================================= void drawStage2_Transit() { if (!kiPopupOffen && !gameOver && !sieg) { zeit += 0.02; if (autoAim && kiGelernt) { float nearestY = starshipY; float minD = 9999; for (int i = 0; i < 4; i++) { if (qX[i] > starshipX) { float d = dist(starshipX, starshipY, qX[i], qY[i]); if (d < minD) { minD = d; nearestY = qY[i]; } } } starshipY += (nearestY - starshipY) * 0.1; } else { float mY = constrain(mouseY, 60, 480); starshipY += (mY - starshipY) * 0.2; } if (schockIntensitaet > 0) { schockRadius += 11; schockIntensitaet -= 5; } } float schiffSkalierung = 1.0 + (ladung / 100.0) * 0.25; float wurzelSpeed = 3.5 + sqrt(ladung) * 1.4; int schritt = 32; float offsetGitter = (frameCount * 2.5) % schritt; for (int x = -30; x <= width + 30; x += schritt) { for (int y = -30; y <= height - 230; y += schritt) { float drawX = x - offsetGitter; float dx = starshipX - drawX; float dy = starshipY - y; float abstand = sqrt(dx*dx + dy*dy); if (abstand == 0) abstand = 0.1; float kompression = (abstand < 180) ? map(abstand, 0, 180, 22 * (ladung/100.0), 0) : 0; float posX = drawX + (dx / abstand) * kompression; float posY = y + (dy / abstand) * kompression; stroke(0, 180, 255, map(abstand, 0, 400, 35, 8)); strokeWeight(1); noFill(); beginShape(); for (int i = 0; i < 6; i++) { vertex(posX + cos(PI/3*i+zeit*0.01)*15, posY + sin(PI/3*i+zeit*0.01)*15); } endShape(CLOSE); } } for (int i = 0; i < 4; i++) { if (!kiPopupOffen && !gameOver && !sieg) { qX[i] -= wurzelSpeed * qSpeed[i]; if (qX[i] < -30) { qX[i] = width + random(50, 300); qY[i] = random(80, 440); } } stroke(0, 255, 180, 200); strokeWeight(1.5); fill(8, 32, 38); ellipse(qX[i], qY[i], 18, 18); fill(255, 180); noStroke(); ellipse(qX[i], qY[i], 6, 6); if (dist(starshipX, starshipY, qX[i], qY[i]) < 36 * schiffSkalierung && !kiPopupOffen && !gameOver && !sieg) { schockX = qX[i]; schockY = qY[i]; schockRadius = 0; schockIntensitaet = 255; qX[i] = width + random(100, 400); score += 50; ladung = constrain(ladung + 15, 0, 100); if (ladung >= 100) sieg = true; } } for (int i = 0; i < 3; i++) { if (!kiPopupOffen && !gameOver && !sieg) { sX[i] -= wurzelSpeed * sSpeed[i] * 1.05; if (bechzahlFeldAktiv) { float dShip = dist(starshipX, starshipY, sX[i], sY[i]); if (dShip < 140) sY[i] += (sY[i] < starshipY) ? -4.5 : 4.5; } if (sX[i] < -30) { sX[i] = width + random(100, 400); sY[i] = random(80, 440); } } stroke(255, 40, 40, 220); strokeWeight(2); fill(30, 6, 12); ellipse(sX[i], sY[i], 22, 22); fill(255, 50, 50, 120 + sin(zeit*20)*100); noStroke(); ellipse(sX[i], sY[i], 10, 10); if (dist(starshipX, starshipY, sX[i], sY[i]) < 32 * schiffSkalierung && !kiPopupOffen && !gameOver && !sieg) { schild--; sX[i] = width + random(300, 600); if (schild == 1 && !kiGelernt) { kiGelernt = true; bechzahlFeldAktiv = true; autoAim = true; kiPopupOffen = true; } else if (schild <= 0) gameOver = true; } } pushMatrix(); translate(starshipX, starshipY); scale(schiffSkalierung); translate(-starshipX, -starshipY); drawStarship(starshipX, starshipY); popMatrix(); drawStage2_HUD(wurzelSpeed); if (gameOver) { fill(255, 50, 50); textAlign(CENTER, CENTER); textSize(24); text("GAME OVER\nHüllenkollaps im Vakuum!", width/2, height/2 - 40); } if (sieg) { fill(0, 255, 180); textSize(22); textAlign(CENTER, CENTER); text("🎉 MARS-ORBIT ERREICHT!\n(Klicke auf den Bildschirm für Stage 3)", width/2, height/2); } if (kiPopupOffen) { fill(10, 20, 35, 235); rect(150, 180, 550, 260, 8); fill(255, 150, 0); textSize(17); textAlign(CENTER, TOP); text("🔥 BECHZAHL-FELD GENERIERT!", width/2, 205); fill(235); textSize(12); text("Die KI schützt das Schiff durch Erhitzen von Nano-Röhren im Schaumstoff.\nTrümmer werden reibungsfrei im Bogen abgewiesen!", width/2, 245); fill(0, 200, 120); rect(width/2 - 110, 375, 220, 40, 5); fill(255); text("AKTIVIEREN ➔", width/2, 395); } } void drawStage2_HUD(float akSpeed) { fill(12, 14, 22); rect(0, 530, width, 220); stroke(35, 48, 68); line(0, 530, width, 530); fill(255); textSize(12); textAlign(LEFT, TOP); text("SCHILD-STATUS:", 35, 550); for (int i = 0; i < 3; i++) { if (i < schild) fill(0, 255, 150); else fill(50, 20, 20); stroke(0); rect(140 + i * 45, 548, 40, 18, 4); } fill(0, 255, 150); text((schild * 33) + "%", 280, 550); fill(255); text("BATTERIE-LADUNG:", 380, 550); fill(40, 50, 65); rect(510, 548, 200, 18, 4); fill(0, 220, 255); rect(510, 548, map(ladung, 0, 100, 0, 200), 18, 4); fill(255); text(ladung + "%", 720, 550); fill(130, 150, 170); textSize(11); text("TLW-Gleichung: v_gitter = 3.5 + sqrt(" + ladung + ") * 1.4 = " + nf(akSpeed, 1, 2) + " L_t", 35, 585); fill(0, 220, 255); text("🎯 Steuerung: Bewege die Maus nach oben/unten!", 510, 585); } // ================================================================= // STAGE 3: MARS TERRAFORMING // ================================================================= void drawStage3_Mars() { if (frameCount % 60 == 0 && !marsTerraformed) { if (dipolNodes > 0) marsPressure = min(600.0, marsPressure + dipolNodes * 1.2); if (bechResonators > 0 && marsPressure > 50.0) marsTemp = min(15.0, marsTemp + bechResonators * 0.4); if (regolithExtractors > 0 && marsTemp > -10.0) marsWater = min(35.0, marsWater + regolithExtractors * 0.3); zecEnergyWatts += 5 + dipolNodes * 2 + bechResonators * 3; if (marsPressure >= 500.0 && marsTemp >= 10.0 && marsWater >= 25.0) marsTerraformed = true; } color marsCol = color(map(marsWater, 0.5, 35.0, 180, 40), map(marsWater, 0.5, 35.0, 60, 140), map(marsWater, 0.5, 35.0, 40, 200)); fill(marsCol); noStroke(); ellipse(240, 280, 320, 320); if (dipolNodes > 0) { noFill(); stroke(0, 220, 255, 120); strokeWeight(2); ellipse(240, 280, 360, 360); } float shopX = 460, shopY = 40, shopW = 600; fill(15, 20, 30); stroke(40, 50, 70); rect(shopX, shopY, shopW, 660, 10); fill(0, 180, 255); textSize(16); textAlign(LEFT, TOP); text("🔴 TERRAFORMING KONTROLLZENTRUM (MARS 2.0)", shopX + 20, shopY + 20); fill(255); textSize(12); text("Atmosphärendruck: " + nf(marsPressure, 1, 1) + " mbar / 600 mbar", shopX + 20, shopY + 55); text("Durchschnitts-Temp: " + nf(marsTemp, 1, 1) + " °C / +15 °C", shopX + 20, shopY + 75); text("Oberflächen-Wasser: " + nf(marsWater, 1, 1) + " % / 35 %", shopX + 20, shopY + 95); text("Verfügbare ZEC-Energie: " + zecEnergyWatts + " kW", shopX + 20, shopY + 115); drawMarsTechBtn(shopX + 20, shopY + 150, shopW - 40, 80, "1. Dipol-ZEC-Knoten (Pol-Magnetfeld)", "Schützt die Atmosphäre vor dem Sonnenwind.", 100, "Aktiv: " + dipolNodes, zecEnergyWatts >= 100); drawMarsTechBtn(shopX + 20, shopY + 245, shopW - 40, 80, "2. Bechzahl-Resonator (CO2-Heizer)", "Verdampft Polareiskappen über Graphen-Aerosole.", 250, "Aktiv: " + bechResonators, zecEnergyWatts >= 250 && marsPressure > 30); drawMarsTechBtn(shopX + 20, shopY + 340, shopW - 40, 80, "3. Regolith H2O-Synthese", "Löst gebundenes Wasser aus dem Staub.", 500, "Aktiv: " + regolithExtractors, zecEnergyWatts >= 500 && marsTemp > -15); fill(8, 12, 16); stroke(0, 180, 255, 60); rect(shopX + 20, shopY + 440, shopW - 40, 190, 8); fill(0, 255, 180); textSize(12); textAlign(LEFT, TOP); text("PLANETARER STATUS:", shopX + 35, shopY + 455); fill(220); textSize(11); if (marsTerraformed) { fill(0, 255, 150); textSize(14); text("🎉 VICTORY! DER MARS IST VOLLSTÄNDIG TERRAFORMIERT!\nFlüssige Ozeane & atembare Luft dank DTIM-ZEC Physik.", shopX + 35, shopY + 485); } else { text("• Baue Dipol-Knoten, um das Verflüchtigen zu stoppen.\n" + "• Bechzahl-Resonatoren verdichten die Atmosphäre.\n" + "• Regolith-Synthese lässt flüssige Seen entstehen.", shopX + 35, shopY + 485); } } // ================================================================= // HELFER & GRAFIK-FUNKTIONEN // ================================================================= void drawStarship(float cx, float cy) { if (bechzahlFeldAktiv) { noFill(); stroke(255, 150, 0, 180 + sin(zeit * 30) * 70); strokeWeight(3); arc(cx + 80, cy, 160, 120, -HALF_PI * 0.8, HALF_PI * 0.8); } stroke(0, 255, 200, 180 + ladung); strokeWeight(2.5); fill(18, 28, 45); ellipse(cx - 30, cy, 18, 55); if (ladung > 0) { fill(0, 255, 180, 100 + sin(zeit * 25) * 80); noStroke(); ellipse(cx - 30, cy, 8, 30); } fill(235, 240, 250); stroke(30, 40, 55); strokeWeight(1.5); beginShape(); vertex(cx - 35, cy - 10); vertex(cx + 40, cy - 8); vertex(cx + 110, cy); vertex(cx + 40, cy + 8); vertex(cx - 35, cy + 10); vertex(cx - 20, cy); endShape(CLOSE); fill(70, 80, 95); stroke(30, 40, 55); rect(cx - 15, cy - 16, 25, 4); rect(cx - 15, cy + 12, 25, 4); } void drawMarsTechBtn(float x, float y, float w, float h, String title, String desc, int cost, String status, boolean canAfford) { fill(canAfford ? color(24, 36, 52) : color(16, 20, 28)); stroke(canAfford ? color(0, 180, 255) : color(40, 45, 55)); rect(x, y, w, h, 6); fill(255); textSize(13); textAlign(LEFT, TOP); text(title, x + 15, y + 10); fill(160); textSize(10); text(desc, x + 15, y + 30); fill(255, 200, 0); textSize(12); text("Kosten: " + cost + " kW", x + 15, y + 52); fill(0, 200, 255); textAlign(RIGHT, TOP); textSize(11); text(status, x + w - 15, y + 10); } void drawClassBtn(float x, float y, float w, float h, String label, boolean active) { fill(active ? color(0, 150, 220) : color(22, 30, 42)); stroke(40, 50, 60); rect(x, y, w, h, 4); fill(255); textSize(11); textAlign(LEFT, CENTER); text(label, x + 10, y + h/2); } void drawShopBtn(float x, float y, float w, float h, String title, String desc, float price, String status, boolean canAfford) { fill(canAfford ? color(24, 36, 52) : color(16, 20, 28)); stroke(canAfford ? color(0, 180, 255) : color(40, 45, 55)); rect(x, y, w, h, 8); fill(255); textSize(13); textAlign(LEFT, TOP); text(title, x + 15, y + 10); fill(160); textSize(10); text(desc, x + 15, y + 28); fill(0, 255, 150); textSize(12); text("Preis: " + nf(price, 1, 2) + " €", x + 15, y + 48); fill(0, 200, 255); textAlign(RIGHT, TOP); textSize(11); text(status, x + w - 15, y + 10); } void drawPartBtn(float x, float y, float w, float h, String title, String desc, int cost, boolean built) { fill(built ? color(0, 180, 100, 40) : (rawMaterials >= cost ? color(24, 36, 52) : color(16, 20, 28))); stroke(built ? color(0, 255, 150) : color(0, 180, 255)); rect(x, y, w, h, 6); fill(255); textSize(13); textAlign(LEFT, TOP); text(title, x + 15, y + 10); fill(160); textSize(11); text(desc, x + 15, y + 32); if (built) { fill(0, 255, 180); text("✅ MONTIERT", x + 15, y + 54); } else { fill(255, 200, 0); text("Kosten: " + cost + " Rohstoffe", x + 15, y + 54); } } // ================================================================= // MOUSE & KEYBOARD INPUTS (MIT BROWSER-SCROLL-SPERRE) // ================================================================= void mousePressed() { if (stage == 0) { if (mouseX > 40 && mouseX < 420 && mouseY > 110 && mouseY < 260) { clickPulse0 = 1.0; contactsCount += (int)random(1, 3); if (recipientClass == 0) { viralMultiplier += 0.08; addStage0Log("Hilfseinrichtung teilt Post. Multiplikator " + nf(viralMultiplier,1,2) + "x"); } else if (recipientClass == 1) { if (random(1.0) < 0.4) money += random(10, 50) * viralMultiplier; addStage0Log("Mail an Prof. gesendet (+Spende)."); } else { if (random(1.0) < 0.15) contactsCount += 50; addStage0Log("Science-Blog berichtet über DTIM-ZEC!"); } } if (mouseX > 55 && mouseX < 405) { if (mouseY > 315 && mouseY < 343) recipientClass = 0; if (mouseY > 348 && mouseY < 376) recipientClass = 1; if (mouseY > 381 && mouseY < 409) recipientClass = 2; } float shopX = 440, shopY = 110, shopW = 620; if (mouseX > shopX + 20 && mouseX < shopX + shopW - 20) { if (mouseY > shopY + 45 && mouseY < shopY + 120 && money >= pythonPrice) { money -= pythonPrice; pythonBots++; pythonPrice *= 1.4; } if (mouseY > shopY + 130 && mouseY < shopY + 205 && money >= geminiPrice) { money -= geminiPrice; geminiAIs++; geminiPrice *= 1.5; } if ((contactsCount >= 100 || money >= 200.0) && mouseY > shopY + 220 && mouseY < shopY + 290) { stage = 1; } } } else if (stage == 1) { float x = 440, y = 110, w = 620; if (mouseX > 40 && mouseX < 420 && mouseY > 110 && mouseY < 250) { if (random(1.0) < 0.4) researchers++; rawMaterials += (int)random(10, 30); addStage1Log("Neuer Forscher / Rohstoffe dazugekommen!"); } if (mouseX > x + 20 && mouseX < x + w - 20) { if (!part1Built && mouseY > y + 45 && mouseY < y + 120 && rawMaterials >= 150) { rawMaterials -= 150; part1Built = true; addStage1Log("✅ ZEC-Reaktor montiert!"); } if (!part2Built && mouseY > y + 130 && mouseY < y + 205 && rawMaterials >= 350) { rawMaterials -= 350; part2Built = true; addStage1Log("✅ Chassis montiert!"); } if (!part3Built && mouseY > y + 215 && mouseY < y + 290 && rawMaterials >= 600) { rawMaterials -= 600; part3Built = true; addStage1Log("✅ Laser montiert!"); } if (!part4Built && mouseY > y + 300 && mouseY < y + 375 && rawMaterials >= 1000) { rawMaterials -= 1000; part4Built = true; addStage1Log("✅ Brücke montiert!"); } } if (part1Built && part2Built && part3Built && part4Built && mouseY > y + 360 && mouseY < y + 410) { stage = 2; initStage2(); } } else if (stage == 2) { if (kiPopupOffen) { if (mouseX > width/2 - 130 && mouseX < width/2 + 130 && mouseY > 380 && mouseY < 422) { kiPopupOffen = false; } return; } if (sieg) { stage = 3; } } else if (stage == 3) { float shopX = 460, shopY = 40, shopW = 600; if (mouseX > shopX + 20 && mouseX < shopX + shopW - 20) { if (mouseY > shopY + 150 && mouseY < shopY + 230 && zecEnergyWatts >= 100) { zecEnergyWatts -= 100; dipolNodes++; } if (mouseY > shopY + 245 && mouseY < shopY + 325 && zecEnergyWatts >= 250 && marsPressure > 30) { zecEnergyWatts -= 250; bechResonators++; } if (mouseY > shopY + 340 && mouseY < shopY + 420 && zecEnergyWatts >= 500 && marsTemp > -15) { zecEnergyWatts -= 500; regolithExtractors++; } } } } void keyPressed() { if (key == ' ' && stage == 0) { clickPulse0 = 1.0; contactsCount += (int)random(1, 3); if (random(1.0) < 0.3) money += random(5, 15); } else if (key == ' ' && stage == 1) { rawMaterials += 15; addStage1Log("Rohstoff-Spende erhalten (+15u)."); } else if (key == ' ' && stage == 3) { zecEnergyWatts += 50; } }