8f099c32ba
AbilityDefBlob/AbilityDefinition gain WindupTicks. AbilityFireSystem's socket loop resolves each socket at the historical command (serverTick - WindupTicks) via GetDataAtTick — a pure fn of replicated data on both worlds (Build Spec §4/ DB-6: no local fireAtTick that would diverge under reprediction; fireCount from that command, spawn uses the current tick's aim/pos; history gap = no-fire). WindupTicks set on the 4 non-Blink Sparks (Blink is movement, resolved by BlinkSystem). 497 EditMode green (no regression). Client telegraph VFX + the reprediction L3 test are operator-eyes / netcode-world follow-ups. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
44 lines
1.9 KiB
C#
44 lines
1.9 KiB
C#
using ProjectM.Simulation;
|
|
using UnityEngine;
|
|
|
|
namespace ProjectM.Authoring
|
|
{
|
|
/// <summary>
|
|
/// Designer-facing definition of one ability. Numeric fields are baked into the AbilityDatabase blob
|
|
/// (immutable, Burst-fast runtime config); the projectile prefab is baked into the companion
|
|
/// AbilityPrefabElement buffer (entity refs cannot live inside a blob). UI fields (icon/description)
|
|
/// are deliberately deferred to a later managed lookup keyed by id.
|
|
/// </summary>
|
|
[CreateAssetMenu(menuName = "Project M/Ability Definition", fileName = "Ability_")]
|
|
public class AbilityDefinition : ScriptableObject
|
|
{
|
|
public AbilityId Id = AbilityId.Primary;
|
|
[Tooltip("Ability kind for the fire-dispatch. Only Projectile is wired today; the rest are the MC-6 spike.")]
|
|
public AbilityArchetype Archetype = AbilityArchetype.Projectile;
|
|
public string DisplayName = "Ability";
|
|
|
|
[Header("Combat")]
|
|
[Min(0f)] public float Damage = 20f;
|
|
[Min(0f)] public float ProjectileSpeed = 25f;
|
|
[Min(0f)] public float Range = 20f;
|
|
|
|
[Header("Auto-target assist")]
|
|
[Min(0f)] public float AutoTargetRange = 12f;
|
|
[Min(0f)] public float AutoTargetConeDegrees = 35f;
|
|
|
|
[Header("Timing")]
|
|
[Min(1)] public int CooldownTicks = 12;
|
|
[Header("Spark effect (LANTERN)")]
|
|
[Tooltip("HookPull: home the hit target to the caster (the Harpooner reel).")]
|
|
public bool Reel = false;
|
|
[Min(0), Tooltip("Aoe/zone + decoy lifetime in ticks (0 = system default).")]
|
|
public int EffectDurationTicks = 0;
|
|
[Header("Manual-aim windup")]
|
|
[Min(0), Tooltip("Telegraph delay (ticks, ~60/s) before the ability resolves. 0 = instant. The SoD 'readable windup'.")]
|
|
public int WindupTicks = 0;
|
|
|
|
[Header("Prefab (baked into the prefab buffer, not the blob)")]
|
|
public GameObject ProjectilePrefab;
|
|
}
|
|
}
|