Balancing: sonnensystem (Erst-Treffer-Bewertung, Loesung nicht aufdecken, Level-Badge) + energiemanager (echter Blackout an Netzfrequenz, Schwierigkeitsrampe)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-08-15 21:59:32 +02:00
parent fb44ec7afe
commit 8b1088a070
5 changed files with 365 additions and 48 deletions
+7
View File
@@ -252,6 +252,13 @@ class Benchmark
*/
private static function scoreSonnensystem(array $r): ?int
{
// Neue Bewertung = Erst-Treffer-Quote (Meisterschaft auf Anhieb, 0100).
// Nur „alle gelöst" ergibt nicht mehr automatisch 100 %.
$firstTryQuote = $r['firstTryQuote'] ?? null;
if (is_numeric($firstTryQuote)) {
return (int)round(max(0, min(100, (float)$firstTryQuote)));
}
// Fallback für Alt-Datensätze ohne Erst-Treffer-Feld.
$completed = $r['completed'] ?? null;
$total = $r['total'] ?? null;
$firstTry = $r['firstTry'] ?? null;