Klima: Flut-Bewertung ans 40%-Spielziel angeglichen

Flut-Score (End- + Live-Score in game-2d/3d) = max(0, 25*(1-Flut/50)): 0% volle 25 Pkt,
40% noch ~5 Pkt, erst ~50% gegen 0 (statt 0 schon ab 31%). Lehrer-Geflutet-Ampel gruen
<25 / gelb <=40 / rot >40. Klima-Stimmung nutzt jetzt den (fairen) Score.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-08-23 12:19:41 +02:00
parent c9eb0e7764
commit 5d79fa3c3a
3 changed files with 16 additions and 6 deletions
+2 -2
View File
@@ -1341,7 +1341,7 @@ function _liveKlimaScore() {
if (state.phase !== 'playing' && state.phase !== 'citizen' && state.phase !== 'end') return null;
var sp = state.diff.startPopulation || 6000;
var tempScore = Math.max(0, Math.min(35, 35 - ((state.currentTemp||0) - 15.5) * 20));
var floodScore = Math.max(0, 25 - (state.floodedPct||0) * 0.8);
var floodScore = Math.max(0, 25 * (1 - (state.floodedPct||0) / 50)); // Ziel < 40 %: bei 40 % noch ~5 Pkt
var budgetScore = Math.max(0, Math.min(20, (state.budget||0) / 10));
var popScore = Math.max(0, Math.min(20, ((state.population||0) / sp) * 20));
return Math.round(tempScore + floodScore + budgetScore + popScore);
@@ -3921,7 +3921,7 @@ function computeStars() {
}
function computeScore() {
const tempScore = Math.max(0, Math.min(35, 35 - (state.currentTemp - 15.5) * 20));
const floodScore = Math.max(0, 25 - state.floodedPct * 0.8);
const floodScore = Math.max(0, 25 * (1 - state.floodedPct / 50)); // Ziel < 40 %: bei 40 % noch ~5 Pkt
const budgetScore = Math.max(0, Math.min(20, state.budget / 10));
const popScore = Math.max(0, Math.min(20, (state.population / state.diff.startPopulation) * 20));
return Math.round(tempScore + floodScore + budgetScore + popScore);