/**
 * @typedef {Object} Mission
 * @property {string} id - Unique Mission ID
 * @property {string} type - "scripted" | "procedural"
 * @property {string} biome - Tile set to use (e.g., "dungeon", "crypt")
 * @property {Object} [genParams] - Parameters for procedural generation
 * @property {number} [genParams.size] - Approximate number of rooms
 * @property {number} [genParams.difficulty] - 1-10 scale
 * @property {string[]} [genParams.forcedTiles] - Specific tiles that must appear
 * @property {Object[]} [scriptedEvents] - Narrative triggers
 */

export const MissionSchema = {
    type: "object",
    required: ["id", "type", "biome"],
    properties: {
        id: { type: "string" },
        type: { type: "string", enum: ["scripted", "procedural"] },
        biome: { type: "string" },
        genParams: {
            type: "object",
            properties: {
                size: { type: "number", minimum: 5 },
                difficulty: { type: "number", minimum: 1, maximum: 10 }
            }
        },
        scriptedEvents: {
            type: "array",
            items: {
                type: "object",
                properties: {
                    trigger: { type: "string" },
                    action: { type: "string" },
                    data: { type: "object" }
                }
            }
        }
    }
};
