using Unity.Entities; namespace ProjectM.Simulation { /// /// Baked config for the Husk wave/threat director (singleton). The director escalates: wave N spawns /// BaseCount + (N-1)*CountPerWave Husks (round-robin over the pool) at a /// deterministic ring around the , one every SpawnIntervalTicks; once a wave is /// cleared the field stays calm for LullTicks before the next, bigger wave. Replaces the flat sustain. /// public struct WaveDirector : IComponentData { public float RingRadius; public int RingSlots; public int BaseCount; public int CountPerWave; public int SpawnIntervalTicks; public int LullTicks; public int MaxAlive; // MC-2 fork-4a: mandatory cap for the 4-type base siege (uncapped packs/spits spike relevancy). // MC-2 base-siege mix bands (the director builds a ZoneEnemyMath.MixBands): BaseCount above = the Grunt base count. public int ChargerBase; public int SpitterBase; public int SwarmerSlotBase; public int ChargerPerEpoch; public int SpitterPerEpoch; public int SwarmerSlotPerEpoch; public int SwarmerPackSize; public int SwarmerPackPerEpoch; public float ClusterTightRadius; } /// Baked pool of Husk prefab variants the director draws from round-robin (Grunt / Swarmer / Brute / ...). public struct WaveEnemyPrefab : IBufferElementData { public Entity Prefab; } /// Phase constants for . public static class WavePhase { public const byte Lull = 0; public const byte Spawning = 1; } /// /// Runtime state of the wave director (server-only singleton; not replicated). Tracks the current wave, the /// phase (lull vs spawning), the next action tick, how many Husks remain to spawn this wave, and a monotonic /// spawn counter (drives the ring slot + the round-robin prefab pick). /// public struct WaveState : IComponentData { public int WaveNumber; public byte Phase; public uint NextActionTick; public int RemainingToSpawn; public int SpawnCounter; } }