using Unity.Entities;
namespace ProjectM.Simulation
{
///
/// MC-2 — server-only Spitter "reposition" brain state. Component PRESENCE is the Spitter discriminator (no
/// enum / brain byte — honours the Burst cross-assembly-enum rule; EnemyAISystem is Bursted): a Husk variant
/// baked with SpitterState is driven by the ranged range-band branch, mutually exclusive with the Charger
/// branch (the AI partitions Spitter = .WithAll<EnemyTag,SpitterState>().WithNone<LungeState>() so no
/// enemy is ever double-moved). The Spitter holds a PREFERRED RANGE band from its target — retreating if too
/// close, advancing if too far — and fires a TELEGRAPHED, dodgeable projectile on its OWN fire gate. If
/// cornered (no retreat room) within CorneredRange it falls back to the Grunt seek+strike. NOT a [GhostField]
/// (only server systems read it). All ticks via TickUtil.NonZero; compared with NetworkTick only.
///
public struct SpitterState : IComponentData
{
/// Band centre: the distance the Spitter tries to hold from its target (world units).
public float PreferredRange;
/// Half-width dead-zone around PreferredRange; inside [pref-tol, pref+tol] the Spitter holds.
public float RangeTolerance;
/// Muzzle speed baked onto the spit projectile (world units/second).
public float ProjectileSpeed;
/// If the target closes within this distance AND the Spitter can't retreat, it melee-falls-back.
public float CorneredRange;
/// Telegraph wind-up lead in ticks before the spit fires (the dodge window). Baked (v1 not
/// live-tunable); keep >= ~24 (> interp delay) so a player reacting to the aim-line can clear the shot.
public int WindupTicks;
/// Server-only fire gate: raw tick of the earliest tick it may spit again (NonZero; 0 = ready). Its
/// OWN gate, never EnemyAttackCooldown. Compared via NetworkTick.IsNewerThan.
public uint NextShotTick;
}
///
/// MC-2 — pure marker for a Swarmer "surround" enemy: mechanically a Grunt (NO AI branch — it falls through the
/// Grunt seek+strike pass) with swarm-tuned baked EnemyStats (fast, low-HP, fast frequent low-chip bites). The
/// tag drives only (a) the director's CLUSTER spawn (PackSize swarmers in one tick) and (b) a client tint. Keeps
/// EnemyTag + RegionTag like every Husk, so readability / health-bars / damage / region-AI all work unchanged.
///
public struct SwarmerTag : IComponentData { }
}