Weltkueche Punkte-Regel: richtig +100, jeder Fehlklick -25 (progressiv, statt Flat 100/60); Regel im Task-Banner sichtbar; Heimat-Zweig 2 Korrekte (Heimat + 1 realistische)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -1007,7 +1007,7 @@ function buildTaskFor(ingKey) {
|
||||
.filter(([c, info]) => C[c] && c !== heimat && mrank(info.market) < 2)
|
||||
.sort((a, b) => (mrank(a[1].market) - mrank(b[1].market)) || ((b[1].t || 0) - (a[1].t || 0)))
|
||||
.map(([c]) => c);
|
||||
const correct = [heimat, ...realistic.slice(0, 2)];
|
||||
const correct = [heimat, ...realistic.slice(0, 1)]; // Heimat + eine realistische Zweit-Wahl (wie normaler Zweig: 2 Korrekte)
|
||||
if (correct.length < 2) { // Garantie: es gibt IMMER eine zweite Wahl
|
||||
const any = Object.entries(ing.producers)
|
||||
.filter(([c]) => C[c] && c !== heimat && !correct.includes(c))
|
||||
@@ -1181,7 +1181,8 @@ function loadIngredient(){
|
||||
? 'aus welchem Land stammt diese Zutat in <b>diesem Gericht</b>?'
|
||||
: 'aus welchem Land kommt diese Zutat häufig zu uns auf den Markt?');
|
||||
document.getElementById('taskBanner').innerHTML=
|
||||
`🔎 Suche: <b>${ing.nm}</b> – ${frage}`;
|
||||
`🔎 Suche: <b>${ing.nm}</b> – ${frage}`
|
||||
+ ` <span style="opacity:.75;font-weight:600;white-space:nowrap">· richtig <b>+100</b>, jeder Fehlklick <b>−25</b> (¼)</span>`;
|
||||
document.getElementById('resultCard').className="result-card";
|
||||
drawMarkers(ing); renderIngList();
|
||||
}
|
||||
@@ -1218,7 +1219,7 @@ function guess(key){
|
||||
playSfx('click-country');
|
||||
if (cls === 'correct') {
|
||||
b.classList.add('correct');
|
||||
const pts = current.wrongStreak===0?100:60;
|
||||
const pts = Math.max(0, 100 - 25 * (current.wrongHere || 0)); // richtig = 100; jeder Fehlklick auf dieser Zutat: −25 (¼)
|
||||
state.score+=pts; current.dishScore+=pts;
|
||||
state.totalCorrect++; current.wrongStreak=0; current.found.push(key);
|
||||
map.flyTo([c.lat,c.lng],3,{duration:.7});
|
||||
|
||||
Reference in New Issue
Block a user