/*
     *  Combat cycle is: Player turn, Minion turn, Enemy turn. Check if attacked party has dead members
     *  after each opposing party member attacks.
     */

    public void StateMachine()
    {
        switch (state)
        {
        case 0:
        {
            if (all[currentEntity].statusEffect[0] != null)
            {
                StatusEffect sf = all[currentEntity].statusEffect[0];
                sf.Effect();
                StartCoroutine(sf.ColorBlink());
            }
            else
            {
                state = 1;
                StateMachine();
            }
            break;
        }

        case 1:
        {
            ChooseMove();
            break;
        }

        case 2:
        {
            break;
        }

        case 3:
        {
            DeadCheck();
            break;
        }

        case 4:
        {
            state         = 0;
            currentEntity = currentEntity == all.Length - 1 ? 0 : currentEntity + 1;
            StateMachine();
            break;
        }
        }
    }