} //Basic enemy turn that will look at which enemy the player is fighting, and start seperate scripts depending on the enemy.

    public IEnumerator EndBattle()
    {
        if (state == BattleStateFossil.WON)
        {
            if (EnemyHolder.bossNumber == 0)
            {
                itemDrop.GenerateFossil();
            }

            winScreenAnimation.StartIEnumerator("OpenWinScreen");

            MusicManager.normalBattleMusic = false;
            MusicManager.bossBattleMusic   = false;
            MusicManager.victoryMusic      = true;

            yield return(new WaitUntil(() => winScreenAnimation.inWinScreen == false));

            yield return(new WaitForSeconds(.6f));

            worldPlayer.GetComponent <LoadBattle>().StartCoroutine("EndBattleTransition");

            yield return(new WaitForSeconds(.95f));

            for (int i = 0; i < currentEnemies.Length; i++)
            {
                Destroy(currentEnemies[i]);
            }

            buttons.SetActive(true);
            enemyTurnAttack = false;
            Array.Clear(currentEnemies, 0, currentEnemies.Length);
            worldPlayer.SetActive(true);
            worldPlayer.GetComponent <SpriteRenderer>().enabled = true;
            mainCamera.orthographicSize = 12;
            worldPlayer.GetComponent <Rigidbody2D>().bodyType = RigidbodyType2D.Dynamic;
            enemiesKilled = 0;

            if (EnemyHolder.bossNumber != 0)
            {
                StartCoroutine(FindObjectOfType <DialogueManager>().StartDialogue(bossDialogue));
            }

            fossilAttacks.purifyUsed = false;
            fossilAttacks.skullUsed  = false;
            fossilAttacks.healUsed   = false;

            EnemyHolder.turnCount     = 0;
            MusicManager.victoryMusic = false;
            BattleCount.inBattle      = false;
            MenuManager.enabled       = true;
            EnemyHolder.bossNumber    = 0;
            battle.SetActive(false);
        }//Turns on the world player, disabled the battle, destroys all the enemies, and clears the current enemy array to reset all values
        else if (state == BattleStateFossil.LOST)
        {
            for (int i = 0; i < currentEnemies.Length; i++)
            {
                Destroy(currentEnemies[i]);
            }
            buttons.SetActive(true);
            enemyTurnAttack = false;
            Array.Clear(currentEnemies, 0, currentEnemies.Length);
            worldPlayer.SetActive(true);
            worldPlayer.GetComponent <SpriteRenderer>().enabled = true;
            mainCamera.orthographicSize = 12;
            worldPlayer.GetComponent <Rigidbody2D>().bodyType = RigidbodyType2D.Dynamic;
            MenuManager.enabled            = true;
            enemiesKilled                  = 0;
            fossilAttacks.purifyUsed       = false;
            fossilAttacks.skullUsed        = false;
            fossilAttacks.healUsed         = false;
            EnemyHolder.bossNumber         = 0;
            MusicManager.normalBattleMusic = false;
            MusicManager.bossBattleMusic   = false;
            MusicManager.victoryMusic      = false;
            EnemyHolder.turnCount          = 0;
            BattleCount.battleCount        = 0;
            BattleCount.inBattle           = false;
            battle.SetActive(false);
            SceneManager.LoadScene("GameOver");
        } //Turns on the world player, disabled the battle, destroys all the enemies, and clears the current enemy array to reset all values
    }     //Reads if the player killed the enemy and responds accordingly