0948d49886
byte Archetype on AbilityDefBlob (AbilityArchetype enum: Projectile/Hitscan/Cone/Aoe), authored on AbilityDefinition + baked in AbilityDatabaseAuthoring, read at dispatch in AbilityFireSystem -- NOT folded through EffectiveAbilityStats/StatRecomputeSystem (static identity, not a tunable stat; MC-4 review BURST-1). All current abilities are Projectile (0) -> zero behaviour change; the dispatch read-point is the de-risk spike for MC-6 hitscan/cone/aoe. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
36 lines
1.4 KiB
C#
36 lines
1.4 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("Prefab (baked into the prefab buffer, not the blob)")]
|
|
public GameObject ProjectilePrefab;
|
|
}
|
|
}
|