3995af736c
BossState (server-only) + BossAISystem: sole mover, seek -> telegraphed radial slam (AttackWindup) -> phase-2 speed + swarmer summon. Excluded from the EnemyAISystem Charger pass; knockback-immune at all 3 stamp sites; arena-anchored spawn; scaled Health/HitRadius/AttackRange. Grunt windup now commits in its last ~30% (whiffs out-of-range); Charger stagger roots; grunt speed 4.2->5.2; swarmer telegraph synced. SweptMove + zone-enemy spawn-stamp extracted to shared helpers. Zero new [GhostField]. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
32 lines
1.9 KiB
C#
32 lines
1.9 KiB
C#
using Unity.Entities;
|
|
|
|
namespace ProjectM.Simulation
|
|
{
|
|
/// <summary>
|
|
/// SERVER-ONLY working state for the expedition BOSS (a scaled Charger that <see cref="Server"/>'s
|
|
/// RoomEnemyDirectorSystem tags at spawn). NOT replicated and NOT baked — added at runtime via ECB on the boss
|
|
/// entity, so it needs no ghost-hash change (a runtime-added replicated component would not replicate anyway;
|
|
/// this one is deliberately server-only, like <see cref="LungeState"/>/<see cref="KnockbackState"/>).
|
|
/// <para>
|
|
/// Component PRESENCE is the boss discriminator: BossAISystem is the SOLE mover/attacker of
|
|
/// <c>.WithAll<EnemyTag, BossState>()</c>, and EnemyAISystem's Charger MOVE pass excludes it via
|
|
/// <c>.WithNone<BossState>()</c> so exactly one system writes the boss's Position/AttackWindup. The boss does
|
|
/// NOT use LungeState (its signature move is a telegraphed radial SLAM, not a lunge) — so EnemyAISystem's
|
|
/// IsLunging derive visits it but sees <c>LungeState.UntilTick==0</c> and derives the bit off (harmless single
|
|
/// writer). <see cref="Phase"/> is a byte (never a C# enum on a Bursted path — the cross-assembly-enum ICE rule).
|
|
/// All tick fields route through <c>TickUtil.NonZero</c> and compare with <see cref="Unity.NetCode.NetworkTick"/>.
|
|
/// </para>
|
|
/// </summary>
|
|
public struct BossState : IComponentData
|
|
{
|
|
/// <summary>1 = phase one (heavy Charger + slam), 2 = phase two (<50% HP: faster + summons adds). Byte, not enum.</summary>
|
|
public byte Phase;
|
|
|
|
/// <summary>Earliest raw tick the boss may begin its next radial SLAM wind-up (NonZero; 0 = ready).</summary>
|
|
public uint SlamReadyTick;
|
|
|
|
/// <summary>Earliest raw tick the boss may summon its next add pack (phase two only; NonZero; 0 = ready).</summary>
|
|
public uint SummonReadyTick;
|
|
}
|
|
}
|