Files
Project-M/Assets/_Project/Scripts/Authoring/Combat/AbilityDefinition.cs
T
kronic 36950ca21d LANTERN P1 Group B: 5-Spark systems — Aoe/Hitscan dispatch + reel/zone/decoy
Aoe/Hitscan archetype dispatch in AbilityFireSystem (both-worlds cooldown;
server-only ecb.Instantiate — the client-never-instantiates invariant; ZoneEffect
vs DecoyTag chosen by prefab membership). Harpooner REEL as a homing state
(ReelState + ReelSystem re-aim the hit Husk's KnockbackState toward the caster's
live position each tick; EnemyAISystem stays sole Position writer), stamped by
ProjectileDamageSystem on a Reel-flag hit. ZonePulseSystem (enemy-only periodic
AoE, caster attribution, no friendly fire, Vortex pull, born-0 lazy-stamp).
Decoy aggro in EnemyAISystem + DecoySystem despawn. AbilityDefBlob gains
EffectFlags (Reel) + DurationTicks. +3 ZonePulseSystem EditMode tests (497 green).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-15 00:00:41 -07:00

41 lines
1.7 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("Prefab (baked into the prefab buffer, not the blob)")]
public GameObject ProjectilePrefab;
}
}