Hazard: Blight geyser — permanent periodic both-sides AoE (Phase 1.5b bundle 3)
Review-first netcode slice (design review wf_900e9965-8f0 -> 11 folded; post-impl wf_5c8299f8-299 clean). A PERMANENT periodic telegraphed AoE in Blight-biome rooms only; one new [GhostField] uint NextEruptTick. - Geyser component + GeyserEruptSystem (server): inverted invalid-tick guard (a baked-0 tick must NEVER erupt -> lazy-stamps born-correct instead of the party-wiping per-tick barrage), inline both-sides gather (SourceNetworkId=-1), reschedule = now + period (never +=), never destroyed. - GeyserTelegraphSystem (client): absolute-tick growing warning disc + erupt burst on the >0->=<0 crossing, latched per NextEruptTick + arm-guard (never edge-detects the replicated field -> no phantom on 0->stamp / relevancy re-entry). Reuses ScorchDecalSystem + DynamicLightSystem. - Seeded in RoomFieldSystem (Blight-gated on plan.Biome, born-correct staggered stamp from live ServerTick), GeyserFieldSpawner + authoring wired into the Gameplay subscene. Geyser.prefab duplicated from ResourceNode (no collider). - BuildDisc promoted to FeedbackFx (shared with the barrel fuse ring). - 474/474 EditMode incl. the unstamped-storm regression; live no-storm end-to-end. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
using Unity.Entities;
|
||||
using Unity.NetCode;
|
||||
|
||||
namespace ProjectM.Simulation
|
||||
{
|
||||
/// <summary>
|
||||
/// A PERMANENT periodic BLIGHT hazard fixture (Phase 1.5b bundle 3; see Geyser_Build_Spec). An ownerless
|
||||
/// INTERPOLATED ghost placed only in Blight-biome expedition rooms. <see cref="NextEruptTick"/> is the ABSOLUTE
|
||||
/// server tick of the next eruption — the ONLY replicated field; the client derives its telegraph countdown and
|
||||
/// erupt-fire from it against its own predicted ServerTick (absolute-tick, NEVER an edge on the field — so it
|
||||
/// survives snapshot loss + relevancy re-entry; the design-review-hardened contract, see Geyser_Build_Spec §7).
|
||||
/// Server-only <see cref="ProjectM.Server"/> GeyserEruptSystem radius-damages LIVING players AND enemies (friendly
|
||||
/// fire, like exploding barrels — also a tactical lure) when it elapses, then reschedules one period ahead of NOW
|
||||
/// (never destroyed; RoomTag teardown removes it). Born-correct: RoomFieldSystem stamps NextEruptTick from the
|
||||
/// live ServerTick at spawn, so the first snapshot never carries the 0 "ready/unstamped" sentinel (a baked 0 must
|
||||
/// be treated as not-ready and NEVER erupted — the inverted invalid-tick guard).
|
||||
/// </summary>
|
||||
public struct Geyser : IComponentData
|
||||
{
|
||||
/// <summary>Absolute server tick of the next eruption (via TickUtil.NonZero; 0 = unstamped = never erupt).</summary>
|
||||
[GhostField] public uint NextEruptTick;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 686fc215cf5ebd84ab06f560f9a16d9e
|
||||
@@ -0,0 +1,20 @@
|
||||
using Unity.Entities;
|
||||
|
||||
namespace ProjectM.Simulation
|
||||
{
|
||||
/// <summary>
|
||||
/// Baked singleton holding the BLIGHT-GEYSER ghost prefab (Geyser_Build_Spec; a ResourceNode sibling — a
|
||||
/// <see cref="Geyser"/> carrier with RegionTag{Expedition} and NO collider). RoomFieldSystem scatters
|
||||
/// <see cref="Count"/> geysers per room epoch ONLY in Blight-biome rooms (plan.Biome == Blight) and NEVER in
|
||||
/// Boss rooms, with a keep-out ring around the room origin (player landing + portal). OPTIONAL: absent
|
||||
/// singleton = no geysers. Mirrors <see cref="CoverFieldSpawner"/>; carries no transform.
|
||||
/// </summary>
|
||||
public struct GeyserFieldSpawner : IComponentData
|
||||
{
|
||||
/// <summary>Baked geyser ghost prefab to instantiate.</summary>
|
||||
public Entity Prefab;
|
||||
|
||||
/// <summary>Geysers per Blight-biome room (Boss rooms get none).</summary>
|
||||
public int Count;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3e7f72ba05b64124fbe572dbadb2a05f
|
||||
@@ -121,6 +121,22 @@ namespace ProjectM.Simulation
|
||||
/// <summary>Detonation damage — hits LIVING enemies AND players alike (friendly fire = the bait mechanic).</summary>
|
||||
public const float BarrelExplodeDamage = 26f;
|
||||
|
||||
// ---- Blight geyser (Phase 1.5b bundle-3 hazard; periodic BOTH-SIDES AoE — see Geyser_Build_Spec) ----
|
||||
|
||||
/// <summary>Ticks between eruptions (~5 s @60). Server reschedules NextEruptTick = now + this each erupt
|
||||
/// (never +=, per the review — anchored += catch-up-storms after a skip).</summary>
|
||||
public const uint GeyserPeriodTicks = 300;
|
||||
|
||||
/// <summary>Telegraph window (ticks, ~1.3 s @60): the client grows the warning disc over the last this-many
|
||||
/// ticks before an eruption (int so the client lead comparison stays signed).</summary>
|
||||
public const int GeyserTelegraphTicks = 78;
|
||||
|
||||
/// <summary>Eruption AoE radius (world units, XZ) — hits LIVING players AND enemies (friendly fire = lure bait).</summary>
|
||||
public const float GeyserEruptRadius = 3.0f;
|
||||
|
||||
/// <summary>Eruption damage per hit.</summary>
|
||||
public const float GeyserEruptDamage = 22f;
|
||||
|
||||
// ---- Expedition BOSS (a scaled Charger given a real kit by BossAISystem; server-only feel consts) ----
|
||||
|
||||
/// <summary>Radial SLAM AoE radius (world units): a player inside this ring at wind-up elapse eats the hit
|
||||
|
||||
Reference in New Issue
Block a user