From cb60a8c16d912963c0df22c9997cee8e10aabdb9 Mon Sep 17 00:00:00 2001 From: Thomas Date: Sat, 11 Jul 2026 17:59:12 +0200 Subject: [PATCH] Tourismustal: Aussichtsplattform-Baubedingungen entknotet Vorher drei verschraenkte Regeln (Hoehe >=6 + Talstation <=4 + Hochlagen) -> fast nirgends baubar. Jetzt: Hoehe >=5 UND Naehe zu Tal- ODER BERGstation (oberes Pistenende) einer Bahn - thematisch korrekt, die Bahn bringt die Ausflugsgaeste ja hinauf. 52 baubare Felder um zwei Bahnen statt Handvoll. Klare Fehlermeldungen je Bedingung. Co-Authored-By: Claude Opus 4.8 (1M context) --- App/sims/tourismustal/js/data.js | 4 ++-- App/sims/tourismustal/js/model.js | 22 ++++++++++++++++++---- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/App/sims/tourismustal/js/data.js b/App/sims/tourismustal/js/data.js index 6dfe0ec..2e43769 100644 --- a/App/sims/tourismustal/js/data.js +++ b/App/sims/tourismustal/js/data.js @@ -75,8 +75,8 @@ export const BUILDINGS = { }, platform: { name: 'Aussichtsplattform', emoji: '🌉', cost: 8000, upkeep: 30, - zone: 'high', staff: 1, summerCap: 130, satBonus: 2, - desc: 'Skywalk am Gipfel: 130 Ausflugsgäste. Nur in den Hochlagen nahe einer Bahn baubar.', + zone: 'any', staff: 1, summerCap: 130, satBonus: 2, + desc: 'Skywalk mit Panorama: 130 Ausflugsgäste. Hoch am Berg bauen, nahe der Tal- oder Bergstation einer Bahn.', }, playground: { name: 'Erlebnisspielplatz', emoji: '🎠', cost: 5500, upkeep: 35, diff --git a/App/sims/tourismustal/js/model.js b/App/sims/tourismustal/js/model.js index 4aac07f..ce2cd1e 100644 --- a/App/sims/tourismustal/js/model.js +++ b/App/sims/tourismustal/js/model.js @@ -286,10 +286,24 @@ export function canPlace(state, type, c, r) { if (type === 'badesee' && !nearWater(state, c, r, 2)) { return { ok: false, reason: 'Der Badesee braucht Wasser – näher am Fluss bauen!' }; } - if ((type === 'bikepark' || type === 'platform') - && !state.buildings.some(b => - (b.type === 'lift' || b.type === 'gondola') && dist(b, { c, r }) <= 4)) { - return { ok: false, reason: `${def.name} braucht eine Bahn in der Nähe (max. 4 Felder) – sie bringt die Gäste hinauf.` }; + if (type === 'bikepark' || type === 'platform') { + // Bahn-Nähe: Talstation zählt immer; für die Aussichtsplattform zählt + // auch die BERGstation (oberes Pistenende) – dort gehört sie ja hin. + const nearBahn = state.buildings.some(b => { + if (b.type !== 'lift' && b.type !== 'gondola') return false; + if (dist(b, { c, r }) <= 4) return true; + if (type !== 'platform') return false; + const top = { c: b.c, r: b.r - (BUILDINGS[b.type].pisteLen || 5) }; + return dist(top, { c, r }) <= 4; + }); + if (!nearBahn) { + return { ok: false, reason: type === 'platform' + ? 'Die Aussichtsplattform braucht eine Bahn in der Nähe (max. 4 Felder um Tal- ODER Bergstation).' + : `${def.name} braucht eine Bahn in der Nähe (max. 4 Felder) – sie bringt die Gäste hinauf.` }; + } + } + if (type === 'platform' && tile.elev < 5) { + return { ok: false, reason: 'Die Aussichtsplattform braucht Aussicht – hoch am Berg bauen (weiter oben)!' }; } if (type === 'access') { let nearRoad = false;