diff --git a/App/sims/klima/engine.js b/App/sims/klima/engine.js index 1dc873e..4798a4e 100644 --- a/App/sims/klima/engine.js +++ b/App/sims/klima/engine.js @@ -218,17 +218,17 @@ game.seaLevelCm = game.seaFastCm + game.committedSeaCm; - // Geflutet-Anteil = sichtbare Wirkung auf der Karte: - // 1) Strand frisst der Meeresspiegel sofort, unabhängig vom Schutz — - // schon kleine cm-Erhöhungen sind im Bild als verschwundenes Sandband - // sichtbar. Wir kappen Strand bei 15 % der Inselfläche. - // 2) Inneres Land (Häuser) säuft ab, sobald der Meeresspiegel den - // Schutz deutlich überschreitet. Protection halbiert die effektive - // Rise (Deiche/Mauern verzögern, halten aber nicht ewig). - const beachLoss = Math.min(15, game.seaLevelCm * 1.5); - const effRise = Math.max(0, game.seaLevelCm - game.protection * 0.5); - const interior = Math.min(85, Math.max(0, effRise - 30) * 1.2); - game.floodedPct = Math.round(beachLoss + interior); + // Geflutet-Anteil = sichtbare Wirkung auf der Karte. STETIG (kein Plateau), + // damit der Wert erkennen lässt, wie gut jemand spielt: + // 1) Strand: geht auch bei gutem Schutz ein Stück verloren (unvermeidbar), + // gedeckelt bei 12 % — der „Preis" jedes cm Meeresspiegel. + // 2) Inneres Land (Häuser): wächst stetig mit dem SCHUTZ-bereinigten + // Anstieg. Guter Schutz (Deiche/Mauern) drückt effRise stark → hält + // das Inland lange trocken; ohne Schutz säuft es rasch ab. + const effRise = Math.max(0, game.seaLevelCm - game.protection * 0.85); + const beachLoss = Math.min(12, game.seaLevelCm * 0.55); + const interior = Math.min(85, effRise * 1.5); + game.floodedPct = Math.round(Math.min(100, beachLoss + interior)); } /* ============================================================ @@ -328,7 +328,7 @@ if (game.population >= popCap) return; const tempFactor = game.currentTemp < 16.5 ? 1 : game.currentTemp < 17.5 ? 0.4 : 0; - const floodFactor = game.floodedPct < 5 ? 1 : game.floodedPct < 15 ? 0.5 : 0; + const floodFactor = game.floodedPct < 15 ? 1 : game.floodedPct < 35 ? 0.5 : 0; const demand = getPowerDemand(game); const powerFactor = demand === 0 ? 1 : (game.powerOutput >= demand ? 1 : 0.3); const budgetFactor = game.budget > 0 ? 1 : 0.2; @@ -519,9 +519,9 @@ pushEvent(game, '🌡️', '+1 °C: Hitzewellen werden häufiger.', 'bad', 'temperature'); if (game.tick === 80 && game.currentTemp > 17 && !eventFiredOnce(game, 'warning-temp3')) pushEvent(game, '🔥', '+2 °C: Pariser Klimaziel überschritten!', 'bad', 'temperature'); - if (game.floodedPct > 5 && game.floodedPct < 10 && !eventFiredOnce(game, 'flood-1')) + if (game.floodedPct > 8 && game.floodedPct < 20 && !eventFiredOnce(game, 'flood-1')) pushEvent(game, '🌊', 'Erste Häuser an der Küste sind betroffen.', 'bad', 'sealevel'); - if (game.floodedPct > 20 && !eventFiredOnce(game, 'flood-2')) + if (game.floodedPct > 40 && !eventFiredOnce(game, 'flood-2')) pushEvent(game, '🌊', 'Massive Überflutung — viele verlieren ihr Zuhause!', 'bad', 'sealevel'); if (game.seaLevelCm > 20 && !eventFiredOnce(game, 'vegetation-dying')) pushEvent(game, '🌿', 'Mangroven und Küstenwälder sterben — Salzwasser versalzt die Böden.', 'bad', 'vegetation'); @@ -640,9 +640,10 @@ game.blackoutStreak = 0; } - // Überflutungs-Schäden + // Überflutungs-Schäden — Multiplikator gesenkt (5 → 3), weil die Flut-Kurve + // jetzt stetig ist und mittlere Läufe höhere %-Werte zeigen als früher. if (game.floodedPct > 0) { - game.population -= Math.round(game.floodedPct * 5 * game.diff.popLossMul); + game.population -= Math.round(game.floodedPct * 3 * game.diff.popLossMul); } if (game.seaLevelCm > 25) { const sev = Math.min(1, (game.seaLevelCm - 25) / 40); @@ -696,7 +697,7 @@ endReason = 'pleite'; game.levelCompleted = true; game.levelWon = false; - } else if (game.floodedPct > 50) { + } else if (game.floodedPct > 60) { endReason = 'ueberflutet'; game.levelCompleted = true; game.levelWon = false; diff --git a/App/teacher.html b/App/teacher.html index 62aae63..09caf07 100644 --- a/App/teacher.html +++ b/App/teacher.html @@ -2619,13 +2619,13 @@ var IV_CSS = '' + '.iv-ct{flex:1}.iv-ct h4{margin:0;font-size:.9rem;font-weight:750;color:var(--iva)}.iv-ct p{margin:0;font-size:.72rem;color:var(--ivmut)}' + '.iv-cn{font-size:1.05rem;font-weight:750;color:var(--iva)}' + '.iv-cempty{font-size:.72rem;color:var(--ivmut);font-style:italic;padding:.7rem .2rem .3rem}' -+ '.iv-cols{display:grid;grid-template-columns:72px 1fr 28px 50px 46px 14px;gap:9px;padding:0 8px 3px;font-size:.52rem;font-weight:700;text-transform:uppercase;letter-spacing:.03em;color:var(--ivmut);border-bottom:1px solid var(--ivline)}' ++ '.iv-cols{display:grid;grid-template-columns:minmax(0,1fr) auto 22px 44px auto 12px;gap:8px;padding:0 8px 3px;font-size:.52rem;font-weight:700;text-transform:uppercase;letter-spacing:.03em;color:var(--ivmut);border-bottom:1px solid var(--ivline)}' + '.iv-cols span:nth-child(2){justify-self:end}.iv-cols span:nth-child(3),.iv-cols span:nth-child(4){justify-self:center}.iv-cols span:nth-child(5){justify-self:end}' -+ '.iv-prow{display:grid;grid-template-columns:72px 1fr 28px 50px 46px 14px;gap:9px;align-items:center;width:100%;text-align:left;cursor:pointer;background:none;border:0;border-radius:8px;padding:7px 8px;font:inherit;color:inherit}' ++ '.iv-prow{display:grid;grid-template-columns:minmax(0,1fr) auto 22px 44px auto 12px;gap:8px;align-items:center;width:100%;max-width:100%;text-align:left;cursor:pointer;background:none;border:0;border-radius:8px;padding:7px 8px;font:inherit;color:inherit;box-sizing:border-box}' + '.iv-last{justify-self:end;font-size:.7rem;color:var(--ivmut);white-space:nowrap}.iv-last-old{color:var(--ivr);font-weight:700}' + '.iv-prow:hover{background:var(--ivsoft)}' + '.iv-nm{font-size:.86rem;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}' -+ '.iv-erf{display:flex;align-items:center;gap:7px;justify-self:end}.iv-ebar{width:70px;height:9px;border-radius:5px;background:var(--ivtrack);overflow:hidden}.iv-ebar>i{display:block;height:100%;border-radius:5px}.iv-erf b{font-size:.78rem;font-weight:700;width:1.7em}' ++ '.iv-erf{display:flex;align-items:center;gap:6px;justify-self:end}.iv-ebar{width:52px;height:9px;border-radius:5px;background:var(--ivtrack);overflow:hidden;flex:none}.iv-ebar>i{display:block;height:100%;border-radius:5px}.iv-erf b{font-size:.78rem;font-weight:700;width:1.7em;text-align:right}' + '.iv-akt{justify-self:center}.iv-dotA{display:block;width:13px;height:13px;border-radius:50%}' + '.iv-hot .iv-dotA{background:var(--ivg);animation:ivblink .55s ease-in-out infinite}.iv-on .iv-dotA{background:var(--ivg);animation:ivblink 1.2s ease-in-out infinite}.iv-mid .iv-dotA{background:var(--ivy);animation:ivblink 2.2s ease-in-out infinite}.iv-off .iv-dotA{background:var(--ivr);opacity:.5}' + '@keyframes ivblink{0%,100%{opacity:1}50%{opacity:.28}}'