mirror of
https://github.com/db9979/tidefront.git
synced 2026-12-06 04:44:09 +01:00
- game-core intel-ops.ts: Patrouille (Prüfung, Runde, Sicht, Sonar, Abfangen), Kampagne, Radarposten, Desinformation der Größenklasse, Bordsicht; neue Sensorarten (Posten, Patrouille, Aufklärer, Verband, Flug, Sonar) - Engine: Patrouille mit Station und Prüftakt (Drohnen abfangen, „Fremde Patrouille gesichtet“), Kampagne mit bis zu 4 Zielen und „Aufklärer gesichtet“, Radarposten (Tabelle radar_post, ohne Migration) mit Betrieb, Abbau und Angriff, bewegte Sensoren (jeder Verband auf See sieht), U-Boote nur mit Sonar, Dossiers und Verteidiger-Wissen als Lagebild, Sammelangriffe prüfen leere Nester nur mit Kenntnis, Übersicht für den Reiter Lagebild - Oberfläche: Planung Patrouille/Kampagne/Radarposten/Posten angreifen (Karte antippen), Feld-Blatt-Schnellstart, Meldungen → Lagebild, Heimholen in Einsatz, Posten, Wegpunkte und wandernde Sichtkreise auf der Karte, „Was hilft?“ für neue Codes, Handbuch, Legende - KI-Spieler: Kampagnen (Festung, Händler sparsam, Freibeuter) und Patrouillen (Freibeuter); Bot-Testlauf prüft Verhalten statt Kampfglück - Simulation sim/intel.ts, Regelwerk Stufe 2 umgesetzt, ENTSCHEIDUNGEN-3 Abschnitt O; Tests und E2E
34 lines
1.9 KiB
TypeScript
34 lines
1.9 KiB
TypeScript
// Karte → Feld-Blatt, Lagebild Stufe 2: Radarposten auf dem Feld (eigener: Reichweite, Betrieb; fremder: angreifen)
|
|
// und Schnellstart „Radarposten errichten“ (freie Küste) bzw. „Patrouille ab hier“ (offene See).
|
|
import type { MapData } from "../lib/trpc.ts";
|
|
import { fmtNum } from "../lib/names.ts";
|
|
import type { Target } from "../App.tsx";
|
|
import { Icon } from "../icons.tsx";
|
|
import { SmallButton } from "../ui.tsx";
|
|
import { IntelStand } from "./IntelStand.tsx";
|
|
|
|
export function PostSheet({ map, sel, now, freeCoast, sea, onPlan }: { map: MapData; sel: Target; now: number; freeCoast: boolean; sea: boolean; onPlan: (t: Target) => void }) {
|
|
const ops = map.intel.ops;
|
|
const post = (map.posts ?? []).find((p) => p.col === sel.col && p.row === sel.row);
|
|
if (!ops) return null;
|
|
return (
|
|
<div className="mt-1 text-xs">
|
|
{post && (
|
|
<div className="flex items-start gap-2">
|
|
<Icon id="radarposten" size={22} />
|
|
<div className="flex-1 min-w-0">
|
|
<div className="text-sm font-semibold">Radarposten{post.own ? "" : ` · ${post.owner}`}</div>
|
|
{post.rangeKm !== null && <div className="text-ink2">Reichweite {fmtNum(post.rangeKm)} km{post.offline ? " · ohne Treibstoff aus" : " · in Betrieb"}</div>}
|
|
{post.intel && <IntelStand tag={post.intel} now={now} />}
|
|
</div>
|
|
</div>
|
|
)}
|
|
<div className="flex flex-wrap gap-1 mt-1">
|
|
{post && !post.own && <SmallButton onClick={() => onPlan({ col: sel.col, row: sel.row, postId: post.id })}>Posten angreifen</SmallButton>}
|
|
{!post && freeCoast && ops.post && <SmallButton onClick={() => onPlan({ col: sel.col, row: sel.row, intelOp: "radarposten" })}>Radarposten errichten</SmallButton>}
|
|
{sea && ops.patrol && <SmallButton onClick={() => onPlan({ col: sel.col, row: sel.row, intelOp: "patrouille" })}>Patrouille ab hier</SmallButton>}
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|