using UnityEngine; using Sirenix.OdinInspector; namespace Beyond { public abstract class SpellDefinition : ScriptableObject { [Header("General Settings")] public string spellName; public string animationClipName; [TextArea] public string description; [Header("Costs & Timing")] public int baseFaithCost = 10; public float castTime = 0.5f; // Time until the effect spawns (Animation event timing) [Header("Targeting")] public float rotationDuration = 0.3f; // How long player rotates towards target /// /// Calculates final cost based on Trinkets (Bloom, Angel Eye, etc) /// public virtual float GetFaithCost(Player player) { float cost = baseFaithCost; // 1. Apply Global Reductions (e.g. Bloom) if (player.CurrentTrinketStats.effectBloom) { cost *= 0.8f; } return cost; } /// /// The logic for the specific spell. /// /// The MonoBehavior running the spell (MagicAttacks) /// The current auto-target (can be null) public abstract void Cast(MagicAttacks caster, Transform target); } }