using System.Collections; using System.Collections.Generic; using UnityEngine; [CreateAssetMenu(fileName = "Spell", menuName = "Custom/Spells/New Spell")] public class Spell : ScriptableObject { public FloatVariable Level; public GameObject SpellObject; public float Cooldown; public SpellType CastType; [SerializeField] private float baseDamageValue; [SerializeField] private float growthPerLevel; [SerializeField] private float exponent; public float GetFinalDamageValue() { return baseDamageValue + Level.Value * Mathf.Pow(growthPerLevel, exponent); } } public enum SpellType { CastOnPlayerPosition, Projectile }