Files
tidefront/apps/api/src/routers/fields.ts
T
db9979 cd48accfc3 Rohstofffelder einnehmen (Welle 3, Teil 1)
Felder auf See (Ölfeld, Erzbucht, Fischgrund, Elektronik-Wrack, Stufen 1-3), deterministisch
aus fester Kandidatenliste, bevorzugt zwischen Häfen, Mindestabstand zum Hafen. Aufklärung und
neue Missionsart Besetzen gegen Kartell-Wache oder Besatzung; Besatzung belegt einen
Missionsplatz, Rückruf macht das Feld neutral. Ertrag alle 4 h als Konvoi zum Heimathafen
(abfangbar, Blockade hält zurück), Unterhalt in Proviant, Höchstzahl nach Hafenkommandantur,
abnehmender Ertrag, Kartellangriffe, Allianz-Einflusszonen mit Bonus und Feldpunkten.
Karte, Infoblatt, Meine Felder, Planung, Legende, Handbuch, Erfolg Landnahme, Simulation
sim/fields.ts, Regeln docs/REGELN-FELDER.md, Schema schema/fields.ts (ohne Migration).
2026-11-27 00:15:29 +01:00

16 lines
740 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// Felder: Rohstofffelder – Lesemodell und Rückruf der Besatzung (Missionen laufen über mission.launch mit fieldId).
// Eingehängt in router.ts.
import { z } from "zod";
import { fieldRecall, fieldsView } from "@tidefront/engine";
import { authed, t } from "../trpc.ts";
const key = z.string().min(8).max(80);
export const fieldsRouter = t.router({
/** Alle Felder (Besitzerfarbe, bekannte Besatzung, Zonen), eigene Felder mit Ertrag, Höchstzahl, nächste Lieferung. */
view: authed.query(({ ctx }) => fieldsView(ctx.engine, ctx.player.id)),
recall: authed
.input(z.object({ key, fieldId: z.number().int().min(1) }))
.mutation(({ ctx, input }) => fieldRecall(ctx.engine, ctx.player.id, input.key, input.fieldId)),
});