#pragma once #include #include #include "Formula.h" #include "RecipesConfig.h" // for RecipeIngredient #include "ShipLayout.h" // for PlacedModule // Build materials and initial per-schematic production level // (REQ-BLD-SHIPYARD, REQ-DEF-SCHEMATIC-DROP). struct ShipSchematic { std::vector materials; int playerProductionLevel; double productionTimeSeconds; }; // Wave scheduling cost (REQ-WAV-THREAT-COST). Ships with cost_formula that // always evaluates to 0 are ineligible as wave picks. struct ShipThreat { Formula costFormula; }; struct ShipHealth { Formula hpFormula; // REQ-SHP-STATS }; struct ShipMovement { Formula speedFormula; // max linear speed cap, tiles/s (REQ-SHP-STATS, REQ-SHP-MOVEMENT) Formula mainAccelerationFormula; // forward acceleration, tiles/s² Formula maneuveringAccelerationFormula;// omnidirectional acceleration, tiles/s² Formula angularAccelerationFormula; // angular acceleration, rad/s² Formula maxRotationSpeedFormula; // angular velocity cap, rad/s }; struct ShipSensor { Formula sensorRangeFormula; // REQ-SHP-SENSOR, REQ-SHP-STATS }; // Scrap dropped on destruction (REQ-RES-SCRAP-DROP). struct ShipLoot { int scrapDrop; }; struct ShipDef { std::string id; bool availableFromStart; std::vector layout; ShipSchematic schematic; ShipThreat threat; ShipHealth health; ShipMovement movement; ShipSensor sensor; ShipLoot loot; // Module layout used for enemy wave ships (REQ-WAV-DEFAULT-MODULES). std::vector defaultModules; }; struct ShipsConfig { std::vector ships; };