2aebc37115
Cone/SpecialSlam damage lands at its visual contact via ConeContactPending (knob 32, 0=legacy; early-flush + resolve re-validate; death + BOTH class-swap paths drop armed pendings — fixes the shipped melee death-strand in the same stroke). Zones: [GhostField] Caster/Radius/NextTick + ZoneTelegraphSystem (Geyser latch contract on InterpolationTick; rim = true radius; arm grows, persistent phase drains). Cone cues latch to contact (FireStartRaw, C14); TuningConfig.Defaults() fallback at client cue sites (release-build timing fix). G4: SaturationMath ally-FX degrade (living-enemy census, solo-exempt; enemy telegraphs structurally exempt) + CombatStressDebug + overlay saturation rows. Reviews wf_98bf1268 (13 confirmed folded) / wf_9757d214 (5 confirmed fixed). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
35 lines
1.7 KiB
C#
35 lines
1.7 KiB
C#
using ProjectM.Simulation;
|
|
using Unity.Entities;
|
|
using UnityEngine;
|
|
|
|
namespace ProjectM.Authoring
|
|
{
|
|
/// <summary>
|
|
/// Authoring for a player-cast ZONE ghost (Vortex / LightZone — the LANTERN Aoe/zone Sparks). Bakes an inert
|
|
/// <see cref="ZoneEffect"/>; the runtime values (caster / radius / damage / lifetime) are stamped at spawn by
|
|
/// <c>AbilityFireSystem</c> — only the Vortex FLAG is authored here (so <c>AbilityFireSystem</c> can pick
|
|
/// ZoneEffect vs DecoyTag by prefab membership, and the pull behaviour is baked-in). The prefab's ghost setup
|
|
/// (GhostAuthoringComponent: interpolated, ownerless) is inherited by DUPLICATING an existing ownerless
|
|
/// interpolated ghost, so position replicates via the stock LocalTransform variant. 07-21 G6: ZoneEffect's
|
|
/// CasterNetworkId / Radius / NextTick are hand-written <c>[GhostField]</c>s (the client fill telegraph). <c>GetEntity(Dynamic)</c> gives a runtime-mutable LocalTransform for the spawn override.
|
|
/// </summary>
|
|
public class ZoneAuthoring : MonoBehaviour
|
|
{
|
|
[Tooltip("Vortex: pull enemies toward the zone centre each tick (in addition to the periodic damage).")]
|
|
public bool Vortex = false;
|
|
|
|
private class ZoneBaker : Baker<ZoneAuthoring>
|
|
{
|
|
public override void Bake(ZoneAuthoring authoring)
|
|
{
|
|
var entity = GetEntity(authoring, TransformUsageFlags.Dynamic);
|
|
AddComponent(entity, new ZoneEffect
|
|
{
|
|
Flags = authoring.Vortex ? ZoneEffectFlag.Vortex : (byte)0,
|
|
// caster / radius / damage / NextTick / ExpireTick are seeded at spawn by AbilityFireSystem.
|
|
});
|
|
}
|
|
}
|
|
}
|
|
}
|