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).
This commit is contained in:
db9979 committed 2026-11-27 00:15:29 +01:00
1 parent 8e022a63e6
commit cd48accfc3
42 files changed
+1862 -30

No files matched your search

+3 -1
View File
@@ -43,6 +43,7 @@ import { admiralRouter } from "./routers/admirals.ts"; // Admirale
import { achievementsRouter } from "./routers/achievements.ts"; // Erfolge
import { allianceOpsRouter } from "./routers/alliance-ops.ts"; // Allianz-Ops
import { navalRouter } from "./routers/naval.ts"; // See: Minen/Blockade/Konvoi
import { fieldsRouter } from "./routers/fields.ts"; // Felder
export type { Ctx };
@@ -51,7 +52,7 @@ const counts = z.record(z.string().max(40), z.number().int().min(0).max(1_000_00
const resources = z.record(z.string().max(20), z.number().int().min(0).max(100_000_000));
const field = { col: z.number().int().min(0).max(500), row: z.number().int().min(0).max(500) };
// See: Minen/Blockade/Konvoi – Ziele und Haltezeit von Seemissionen.
const navalTarget = { blockadeId: z.number().int().min(1).optional(), convoyId: z.number().int().min(1).optional(), holdHours: z.number().int().min(0).max(48).optional() };
const navalTarget = { blockadeId: z.number().int().min(1).optional(), convoyId: z.number().int().min(1).optional(), holdHours: z.number().int().min(0).max(48).optional(), fieldId: z.number().int().min(1).optional(), stayAll: z.boolean().optional() }; // Felder: fieldId, stayAll
export const appRouter = t.router({
meta: t.procedure.query(() => ({ balance, serverNow: Date.now(), version: APP_VERSION, builtAt: BUILD_TIME })),
@@ -190,6 +191,7 @@ export const appRouter = t.router({
achievements: achievementsRouter, // Erfolge und Wochenziele
allianceOps: allianceOpsRouter, // Allianz-Ops: Sammelangriff, Stationierung
naval: navalRouter, // See: Minen/Blockade/Konvoi
fields: fieldsRouter, // Felder
});
export type AppRouter = typeof appRouter;
+15
View File
@@ -0,0 +1,15 @@
// 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)),
});