namespace Core.Domain.Status.Effects
{
    public class SpeedBoostEffect : IStatusEffect
    {
        private float _duration;
        private readonly float _multiplier;

        public bool IsExpired => _duration <= 0;

        public SpeedBoostEffect(float duration, float multiplier = 1.5f)
        {
            _duration = duration;
            _multiplier = multiplier;
        }

        public void Tick(float deltaTime)
        {
            _duration -= deltaTime;
        }

        public void ModifyCapabilities(ref PlayerCapabilities caps)
        {
            caps.SpeedMultiplier *= _multiplier;
        }

        public void OnApply() { }
        public void OnRemove() { }
    }
}