public void UseAbility()
    {
        if (!abilityActive && GameObject.FindObjectOfType <ProgressTracker>().GameStillInSession() && !player.GetAbilityUseStatus())
        {
            switch (abilityType)
            {
            case AbilityType.defense: {
                abilityActive = true;
                HealthBehavior playerHealth = player.GetComponent <HealthBehavior>();
                playerHealth.SetDividerValue(potency + 1);
                playerHealth.EnableBlockDamage(true);
                player.AbilityInUse(true);
                player.SetMyAnimator("StartDefense");

                if (abilityEffectPrefab)
                {
                    activeAbilityEffect = Instantiate(abilityEffectPrefab, player.transform.position, Quaternion.identity);
                    activeAbilityEffect.transform.parent   = player.transform;
                    activeAbilityEffect.transform.position = player.transform.position;
                }

                DisableAbilityLabels();
            }
            break;

            case AbilityType.dodge: {
                abilityActive = true;
                HealthBehavior playerHealth = player.GetComponent <HealthBehavior>();
                playerHealth.SetAbsorbAttack(true, potency);
                player.AbilityInUse(true);
                player.SetMyAnimator("Dodge");
                DisableAbilityLabels();
            }
            break;

            case AbilityType.stun: {
                abilityActive = true;
                OffenseBehavior playerOffense = player.GetComponent <OffenseBehavior>();
                playerOffense.AbilityAttack(abilityType, potency);
                player.SetMyAnimator("stunAttack");
                DisableAbilityLabels();
                coolDownTime = Mathf.Clamp(coolDownTime + 1f, 1f, 10f);
            }
            break;

            default: { Debug.Log("Ability was not specified. cannot be used."); }
            break;
            }

            if (coolDownTime > 0)
            {
                StartCoroutine(CoolDownAbility(coolDownTime));
            }
        }
    }