Пример #1
0
    // Start is called before the first frame update
    void Start()
    {
        //Button MaxHpLevelIncrease = GetComponent<Button>();
        // Button MaxHpLevelDecrease = GetComponent<Button>();

        // look up on the list of objects and get CharacterManagerScript component for the object tagged as CharacterManager
        charactersManager = GameObject.FindGameObjectWithTag("CharacterManager").GetComponent <CharacterManagerScript>();

        Skillpoint = 100;
        Level      = 1;

        // -----------------------------MaxHp------------------------------//
        CurrentMaxHpStats = 0;
        MaxHpLevel        = 0;

        // -----------------------------Ammunition Size--------------------//
        MaxAmmoSizeLevel        = 0;
        CurrentMaxAmmoSizeStats = 0;

        // -----------------------------MaxEnergy--------------------------//
        MaxEnergyLevel = 0;
        MaxEnergyStats = 0;

        // -----------------------------ReloadSpeed------------------------//
        ReloadSpeedLevel        = 0;
        CurrentReloadSpeedStats = 0;

        // -----------------------------MoveSpeed--------------------------//
        MoveSpeedLevel        = 0;
        CurrentMoveSpeedStats = 0;

        // -----------------------------Skill CDR--------------------------//
        SkillCDRLevel        = 0;
        CurrentSkillCDRStats = 0;

        // ----------------------------------Fire rate-------------------------------------- //
        FireRateLevel        = 0;
        CurrentFireRateStats = 0;

        // ----------------------------------Grenade Damage Area-------------------------------------- //
        GrenadeDamageAreaLevel        = 0;
        CurrentGrenadeDamageAreaStats = 0;

        // ----------------------------------Gun Damage Increase-------------------------------------- //
        GunDamageLevel        = 0;
        CurrentGunDamageStats = 0;

        // ----------------------------------Grenade Damage Increase-------------------------------------- //
        GrenadeDamageLevel        = 0;
        CurrentGrenadeDamageStats = 0;

        // MaxHealth = 100;
        //  CurrentHealth = MaxHealth;
        // healthbar.value = CalculateHealth();


        //   MaxExp = 100;
        //   CurrentExp = 0;
        //   expbar.value = CalculateExp();
    }
Пример #2
0
 void Awake()
 {
     if (_instance == null)
     {
         _instance = this;
     }
     DontDestroyOnLoad(this);
 }
Пример #3
0
    public void Reset()
    {
        ChangeScene();

        netrixiInParty = false;
        folkvarInParty = false;
        ivInParty      = false;

        barkeeperMad = false;
        EnemyManagerScript.barkeeperMadNextRound = false;

        CharacterManagerScript.ResetVariables();
        EnemyManagerScript.ClearMoves();
    }
Пример #4
0
    public static void IvAction()
    {
        if (CombatManagerScript.ivAttacks)
        {
            // First spell
            // If player pulls their hand back first
            if (MarkerManagerScript.wasSmaller)
            {
                ivCondition1[0] = true;
            }

            if (ivCondition1[0])
            {
                // If player then moves hand close to the webcam
                if (Input.GetKeyDown(KeyCode.N))
                {
                    ivCondition1[1] = true;
                }

                // If player instead moves hand back to a resting position
                else if (Input.GetKeyDown(KeyCode.M))
                {
                    ivCondition1[0] = false;
                }
            }


            // Second spell
            // If the player is right-handed
            if (GameManagerScript.rightHanded)
            {
                // If player starts by placing their hand in the middle-right corner
                if (MarkerManagerScript.currentLocation == 6)
                {
                    ivCondition2[0] = true;
                }

                if (ivCondition2[0] && !ivCondition2[1])
                {
                    Debug.Log("Point 1");

                    // If player then places their their hand in the middle-left corner
                    if (Input.GetKeyDown(KeyCode.A))
                    {
                        ivCondition2[1] = true;
                    }

                    // If player instead places their hand in any other corner
                    if (!ivCondition2[1])
                    {
                        if (Input.GetKeyDown(KeyCode.Q) || Input.GetKeyDown(KeyCode.E) || Input.GetKeyDown(KeyCode.S) ||
                            Input.GetKeyDown(KeyCode.Z) || Input.GetKeyDown(KeyCode.C))
                        {
                            ivCondition2[0] = false;
                        }
                    }
                }
            }

            // If the player is left-handed
            else
            {
                // If player starts by placing their hand in the middle-left corner
                if (MarkerManagerScript.currentLocation == 4)
                {
                    ivCondition2[0] = true;
                }

                if (ivCondition2[0] && !ivCondition2[1])
                {
                    Debug.Log("Point 1");

                    // If player then places their their hand in the middle-right corner
                    if (Input.GetKeyDown(KeyCode.D))
                    {
                        ivCondition2[1] = true;
                    }

                    // If player instead places their hand in any other corner
                    if (!ivCondition2[1])
                    {
                        if (Input.GetKeyDown(KeyCode.Q) || Input.GetKeyDown(KeyCode.E) || Input.GetKeyDown(KeyCode.S) || Input.GetKeyDown(KeyCode.Z) || Input.GetKeyDown(KeyCode.C))
                        {
                            ivCondition2[0] = false;
                        }
                    }
                }
            }

            // If player has completed the first two moves
            if (ivCondition2[1] && !ivCondition2[2])
            {
                Debug.Log("Point 2");

                // If player then places their their hand in the top-middle corner
                if (Input.GetKeyDown(KeyCode.W))
                {
                    ivCondition2[2] = true;
                }

                // If player instead places their hand in any other corner
                if (!ivCondition2[2])
                {
                    if (Input.GetKeyDown(KeyCode.Q) || Input.GetKeyDown(KeyCode.E) || Input.GetKeyDown(KeyCode.S) ||
                        Input.GetKeyDown(KeyCode.Z) || Input.GetKeyDown(KeyCode.C))
                    {
                        ivCondition2[0] = false;
                        ivCondition2[1] = false;
                    }
                }
            }

            // If player has then placed hand in the top-middle corner
            if (ivCondition2[2] && !ivCondition2[3])
            {
                Debug.Log("Point 3");

                // If player then places their their hand in the bottom-middle corner
                if (Input.GetKeyDown(KeyCode.X))
                {
                    Debug.Log("Point 4");

                    // The player has successfully made the pattern
                    ivCondition2[3] = true;
                }

                // If player instead places their hand in any other corner
                if (!ivCondition2[3])
                {
                    if (Input.GetKeyDown(KeyCode.Q) || Input.GetKeyDown(KeyCode.E) || Input.GetKeyDown(KeyCode.S) || Input.GetKeyDown(KeyCode.Z) || Input.GetKeyDown(KeyCode.C))
                    {
                        ivCondition2[0] = false;
                        ivCondition2[1] = false;
                        ivCondition2[2] = false;
                    }
                }
            }



            // Third spell
            // If player starts to rotate their hand first
            if (GameManagerScript.rightHanded)
            {
                if (Input.GetKeyDown(KeyCode.K))
                {
                    ivCondition3[0] = true;
                }
            }
            else
            {
                if (Input.GetKeyDown(KeyCode.J))
                {
                    ivCondition3[0] = true;
                }
            }


            if (ivCondition3[0])
            {
                // If player then rotates hand to desired location and locks in their choice
                if (Input.GetKeyDown(KeyCode.V))
                {
                    ivCondition3[1] = true;
                }


                // If player then rotates hand to the first or second zone
                if (Input.GetKeyDown(KeyCode.L) || Input.GetKeyDown(KeyCode.G))
                {
                    ivRotation = 1;
                }

                // If player then rotates hand to the third or fourth zone
                if (Input.GetKeyDown(KeyCode.B) || Input.GetKeyDown(KeyCode.T))
                {
                    ivRotation = 2;
                }

                // If player then rotates hand to the fifth zone
                if (Input.GetKeyDown(KeyCode.R))
                {
                    ivRotation = 3;
                }
            }



            // Check to see if the player decided to move for their turn instead
            if (MarkerManagerScript.goMarker)
            {
                if (Input.GetKeyDown(KeyCode.V))
                {
                    ivCondition4[0] = true;
                }
            }

            if (ivCondition4[0])
            {
                // If the player decides to move Folkvar to the left
                if (Input.GetKeyDown(KeyCode.Q) || Input.GetKeyDown(KeyCode.A) || Input.GetKeyDown(KeyCode.Z))
                {
                    if (CharacterManagerScript.MoveIv(1) == 1)
                    {
                        ivCondition4[1] = true;
                    }

                    // If they cannot move in that direction
                    if (CharacterManagerScript.MoveIv(1) == 2)
                    {
                        print("Choose another direction to move in");
                        ivCondition4[0] = false;
                    }
                }

                // If the player decides to move Folkvar to the right
                if (Input.GetKeyDown(KeyCode.E) || Input.GetKeyDown(KeyCode.D) || Input.GetKeyDown(KeyCode.C))
                {
                    if (CharacterManagerScript.MoveIv(2) == 1)
                    {
                        ivCondition4[2] = true;
                    }

                    // If they cannot move in that direction
                    if (CharacterManagerScript.MoveIv(2) == 2)
                    {
                        print("Choose another direction to move in");
                        ivCondition4[0] = false;
                    }
                }
            }
            else
            {
                ivCondition4[1] = false;
                ivCondition4[2] = false;
            }



            // check to see if Iv can perform any actions
            CombatManagerScript.IvTeamSupport();


            // Reset variables if an action is canceled
            if (MarkerManagerScript.undoMarker)
            {
                if (Input.GetKeyDown(KeyCode.U))
                {
                    ResetIvVariables();
                }
            }
        }
    }
Пример #5
0
    public static void NetrixiAttack()
    {
        if (CombatManagerScript.netrixiAttacks)
        {
            // First spell
            // If player pulls their hand back first
            if (MarkerManagerScript.wasSmaller)
            {
                netrixiCondition1[0] = true;
            }

            if (netrixiCondition1[0])
            {
                // If player then moves hand close to the webcam
                if (Input.GetKeyDown(KeyCode.N))
                {
                    netrixiCondition1[1] = true;
                }

                // If player instead moves hand back to a resting position
                else if (Input.GetKeyDown(KeyCode.M))
                {
                    netrixiCondition1[0] = false;
                }
            }


            // Second spell
            // If player starts to rotate their hand first
            if (GameManagerScript.rightHanded)
            {
                if (Input.GetKeyDown(KeyCode.K))
                {
                    netrixiCondition2[0] = true;
                }
            }
            else
            {
                if (Input.GetKeyDown(KeyCode.J))
                {
                    netrixiCondition2[0] = true;
                }
            }


            if (netrixiCondition2[0])
            {
                // If player then rotates hand to desired location and locks in their choice
                if (Input.GetKeyDown(KeyCode.V))
                {
                    netrixiCondition2[1] = true;
                }


                // If player then rotates hand to the first zone
                if (Input.GetKeyDown(KeyCode.L))
                {
                    netrixiRotation = 1;
                }

                // If player then rotates hand to the second zone
                if (Input.GetKeyDown(KeyCode.G))
                {
                    netrixiRotation = 2;
                }

                // If player then rotates hand to the third zone
                if (Input.GetKeyDown(KeyCode.B))
                {
                    netrixiRotation = 3;
                }

                // If player then rotates hand to the fourth zone
                if (Input.GetKeyDown(KeyCode.T))
                {
                    netrixiRotation = 4;
                }

                // If player then rotates hand to the fifth zone
                if (Input.GetKeyDown(KeyCode.R))
                {
                    netrixiRotation = 5;
                }
            }


            // Third spell
            // If the player is right-handed
            if (GameManagerScript.rightHanded)
            {
                // If player starts by placing their hand in the middle-right corner
                if (MarkerManagerScript.currentLocation == 6)
                {
                    netrixiCondition3[0] = true;
                }

                if (netrixiCondition3[0] && !netrixiCondition3[1])
                {
                    Debug.Log("Point 1");

                    // If player then places their their hand in the bottom-middle corner
                    if (Input.GetKeyDown(KeyCode.X))
                    {
                        netrixiCondition3[1] = true;
                    }

                    // If player instead places their hand in any other corner
                    if (!netrixiCondition3[1])
                    {
                        if (Input.GetKeyDown(KeyCode.Q) || Input.GetKeyDown(KeyCode.E) || Input.GetKeyDown(KeyCode.S) || Input.GetKeyDown(KeyCode.Z) || Input.GetKeyDown(KeyCode.C))
                        {
                            netrixiCondition3[0] = false;
                        }
                    }
                }

                // If player has then placed hand in the bottom-middle corner
                if (netrixiCondition3[1] && !netrixiCondition3[2])
                {
                    Debug.Log("Point 2");

                    // If player then places their their hand in the middle-left corner
                    if (Input.GetKeyDown(KeyCode.A))
                    {
                        netrixiCondition3[2] = true;
                    }

                    // If player instead places their hand in any other corner
                    if (!netrixiCondition3[2])
                    {
                        if (Input.GetKeyDown(KeyCode.Q) || Input.GetKeyDown(KeyCode.E) || Input.GetKeyDown(KeyCode.S) || Input.GetKeyDown(KeyCode.Z) || Input.GetKeyDown(KeyCode.C))
                        {
                            netrixiCondition3[0] = false;
                            netrixiCondition3[1] = false;
                        }
                    }
                }

                // If player has then placed hand in the middle-left corner
                if (netrixiCondition3[2] && !netrixiCondition3[3])
                {
                    Debug.Log("Point 3");

                    // If player then places their their hand in the top-middle corner
                    if (Input.GetKeyDown(KeyCode.W))
                    {
                        netrixiCondition3[3] = true;
                    }

                    // If player instead places their hand in any other corner
                    if (!netrixiCondition3[3])
                    {
                        if (Input.GetKeyDown(KeyCode.Q) || Input.GetKeyDown(KeyCode.E) || Input.GetKeyDown(KeyCode.S) || Input.GetKeyDown(KeyCode.Z) || Input.GetKeyDown(KeyCode.C))
                        {
                            netrixiCondition3[0] = false;
                            netrixiCondition3[1] = false;
                            netrixiCondition3[2] = false;
                        }
                    }
                }

                // If the player has successfully made the pattern
                if (netrixiCondition3[3])
                {
                    Debug.Log("Point 4");

                    if (Input.GetKeyDown(KeyCode.V))
                    {
                        netrixiCondition3[4] = true;
                    }
                }
            }

            // if the player is left-handed
            else
            {
                // If player starts by placing their hand in the middle-left corner
                if (MarkerManagerScript.currentLocation == 4)
                {
                    netrixiCondition3[0] = true;
                }

                if (netrixiCondition3[0] && !netrixiCondition3[1])
                {
                    Debug.Log("Point 1");

                    // If player then places their their hand in the bottom-middle corner
                    if (Input.GetKeyDown(KeyCode.X))
                    {
                        netrixiCondition3[1] = true;
                    }

                    // If player instead places their hand in any other corner
                    if (!netrixiCondition3[1])
                    {
                        if (Input.GetKeyDown(KeyCode.Q) || Input.GetKeyDown(KeyCode.E) || Input.GetKeyDown(KeyCode.S) || Input.GetKeyDown(KeyCode.Z) || Input.GetKeyDown(KeyCode.C))
                        {
                            netrixiCondition3[0] = false;
                        }
                    }
                }

                // If player has then placed hand in the bottom-middle corner
                if (netrixiCondition3[1] && !netrixiCondition3[2])
                {
                    Debug.Log("Point 2");

                    // If player then places their their hand in the middle-right corner
                    if (Input.GetKeyDown(KeyCode.D))
                    {
                        netrixiCondition3[2] = true;
                    }

                    // If player instead places their hand in any other corner
                    if (!netrixiCondition3[2])
                    {
                        if (Input.GetKeyDown(KeyCode.Q) || Input.GetKeyDown(KeyCode.E) || Input.GetKeyDown(KeyCode.S) || Input.GetKeyDown(KeyCode.Z) || Input.GetKeyDown(KeyCode.C))
                        {
                            netrixiCondition3[0] = false;
                            netrixiCondition3[1] = false;
                        }
                    }
                }

                // If player has then placed hand in the middle-right corner
                if (netrixiCondition3[2] && !netrixiCondition3[3])
                {
                    Debug.Log("Point 3");

                    // If player then places their their hand in the top-middle corner
                    if (Input.GetKeyDown(KeyCode.W))
                    {
                        netrixiCondition3[3] = true;
                    }

                    // If player instead places their hand in any other corner
                    if (!netrixiCondition3[3])
                    {
                        if (Input.GetKeyDown(KeyCode.Q) || Input.GetKeyDown(KeyCode.E) || Input.GetKeyDown(KeyCode.S) || Input.GetKeyDown(KeyCode.Z) || Input.GetKeyDown(KeyCode.C))
                        {
                            netrixiCondition3[0] = false;
                            netrixiCondition3[1] = false;
                            netrixiCondition3[2] = false;
                        }
                    }
                }

                // If the player has successfully made the pattern
                if (netrixiCondition3[3])
                {
                    Debug.Log("Point 4");

                    netrixiCondition3[4] = true;
                }
            }



            // Check to see if the player decided to move for their turn instead
            if (MarkerManagerScript.goMarker)
            {
                if (Input.GetKeyDown(KeyCode.V))
                {
                    netrixiCondition4[0] = true;
                }
            }

            if (netrixiCondition4[0])
            {
                // If the player decides to move Netrixi to the left
                if (Input.GetKeyDown(KeyCode.Q) || Input.GetKeyDown(KeyCode.A) || Input.GetKeyDown(KeyCode.Z))
                {
                    if (CharacterManagerScript.MoveNetrixi(1) == 1)
                    {
                        netrixiCondition4[1] = true;
                    }

                    // If they cannot move in that direction
                    if (CharacterManagerScript.MoveNetrixi(1) == 2)
                    {
                        print("Choose another direction to move in");
                        netrixiCondition4[0] = false;
                    }
                }

                // If the player decides to move Netrixi to the right
                if (Input.GetKeyDown(KeyCode.E) || Input.GetKeyDown(KeyCode.D) || Input.GetKeyDown(KeyCode.C))
                {
                    if (CharacterManagerScript.MoveNetrixi(2) == 1)
                    {
                        netrixiCondition4[2] = true;
                    }

                    // If they cannot move in that direction
                    if (CharacterManagerScript.MoveNetrixi(2) == 2)
                    {
                        print("Choose another direction to move in");
                        netrixiCondition4[0] = false;
                    }
                }
            }
            else
            {
                netrixiCondition4[1] = false;
                netrixiCondition4[2] = false;
            }



            // Check to see if Netrixi can cast any spells
            CombatManagerScript.NetrixiSpellCast();


            // Reset variables if a spell is canceled
            if (MarkerManagerScript.undoMarker)
            {
                if (Input.GetKeyDown(KeyCode.U))
                {
                    ResetNetrixiVariables();
                }
            }
        }
    }
    // Start is called before the first frame update
    void Start()
    {
        MarkerManagerScript.S.Reset();
        CharacterManagerScript.StartCombat();

        firstAttack  = 0;
        secondAttack = 0;

        netrixiAttacks = false;
        folkvarAttacks = false;
        ivAttacks      = false;

        NetrixiCombatScript.ResetNetrixiVariables();
        FolkvarCombatScript.ResetFolkvarVariables();
        IvCombatScript.ResetIvVariables();

        isNetrixi = true;
        isFolkvar = true;
        isIv      = true;

        roundNumber = 1;


        // Determine which characters are in the scene
        netrixiAlive = true;
        if (GameManagerScript.folkvarInParty)
        {
            folkvarAlive = true;
        }
        else
        {
            folkvarAlive = false;
        }
        if (GameManagerScript.ivInParty)
        {
            ivAlive = true;
        }
        else
        {
            ivAlive = false;
        }

        // Determine which enemies are in the scene
        enemy1Alive = true;
        if (EnemyManagerScript.enemy2 == "null")
        {
            enemy2Alive     = false;
            canEnemy2Attack = false;
        }
        else
        {
            enemy2Alive = true;
        }

        if (EnemyManagerScript.enemy3 == "null")
        {
            enemy3Alive     = false;
            canEnemy3Attack = false;
        }
        else
        {
            enemy3Alive = true;
        }


        playerAttacking1 = false;
        playerAttacking2 = false;
        enemyAttacking1  = false;
        enemyAttacking2  = false;


        // Reset any transformed enemies
        if (!canEnemy1Attack)
        {
            NetrixiAttackScript.enemy1Transformed = false;
        }
        if (!canEnemy2Attack)
        {
            NetrixiAttackScript.enemy2Transformed = false;
        }
        if (!canEnemy3Attack)
        {
            NetrixiAttackScript.enemy3Transformed = false;
        }

        canEnemy1Attack = true;
        canEnemy2Attack = true;
        canEnemy3Attack = true;


        // If only Netrixi is present in the scene
        //if (netrixiAlive && !folkvarAlive && !ivAlive) netrixiAttacks = true;


        win  = false;
        lose = false;

        hasWon  = false;
        hasLost = false;

        enemy1StartingHP = enemy1HP;
        enemy2StartingHP = enemy2HP;
        enemy3StartingHP = enemy3HP;
    }
    // Update is called once per frame
    void Update()
    {
        CharactersAlive();
        EndOfCombat();

        if (hasWon)
        {
            win = false;
        }
        if (hasLost)
        {
            lose = false;
        }

        if (win)
        {
            hasWon = true;
        }
        if (lose)
        {
            hasLost = true;
        }


        if (win)
        {
            // TODO: Play won-battle animation
            GameManagerScript.NextScene(false);
            print("You won!...that battle");
            win = false;
        }
        else
        {
            if (lose)
            {
                // TODO: Play lost-battle animation
                GameManagerScript.NextScene(false);
                print("You Lose");
                lose = false;
            }
        }

        // If the Netrixi marker is visible
        if (MarkerManagerScript.netrixiMarker)
        {
            if (isNetrixi)
            {
                if (netrixiAlive)
                {
                    netrixiAttacks = true;
                    folkvarAttacks = false;
                    ivAttacks      = false;

                    isNetrixi = false;

                    print("Netrixi will attack with a spell");
                }
            }
        }
        else
        {
            isNetrixi = true;
        }

        // If the Folkvar marker is visible
        if (MarkerManagerScript.folkvarMarker)
        {
            if (isFolkvar)
            {
                if (folkvarAlive)
                {
                    folkvarAttacks = true;
                    netrixiAttacks = false;
                    ivAttacks      = false;

                    isFolkvar = false;

                    print("Folkvar will attack with his mighty weapons");
                }
            }
        }
        else
        {
            isFolkvar = true;
        }

        // If the Iv marker is visible
        if (MarkerManagerScript.ivMarker)
        {
            if (isIv)
            {
                if (ivAlive)
                {
                    ivAttacks      = true;
                    netrixiAttacks = false;
                    folkvarAttacks = false;

                    isIv = false;

                    print("Iv will block with her force powers");
                }
            }
        }
        else
        {
            isIv = true;
        }


        // Reset player attacks and move onto next round if player locks in their choices
        if (secondAttack != 0)
        {
            if (MarkerManagerScript.goMarker)
            {
                if (Input.GetKeyDown(KeyCode.V))
                {
                    if (!NetrixiCombatScript.netrixiCondition4[0] || !FolkvarCombatScript.folkvarCondition4[0] || !IvCombatScript.ivCondition4[0])
                    {
                        if (!hasRunSimulation)
                        {
                            // Run combat simulation
                            var go     = new GameObject("runner");
                            var runner = go.AddComponent <CombatSimulationScript>();
                            runner.StartCoroutine(runner.RunSimulation(firstAttack, secondAttack, EnemyManagerScript.firstAttack, EnemyManagerScript.secondAttack, go));
                            hasRunSimulation = true;
                        }
                    }
                }
            }
        }



        // Determine whether the player has chosen a combat move
        if (netrixiAttacks)
        {
            if (CombatManagerScript.netrixiAlive)
            {
                NetrixiCombatScript.NetrixiAttack();
            }
        }
        if (folkvarAttacks)
        {
            if (CombatManagerScript.folkvarAlive)
            {
                FolkvarCombatScript.FolkvarAttack();
            }
        }
        if (ivAttacks)
        {
            if (CombatManagerScript.ivAlive)
            {
                IvCombatScript.IvAction();
            }
        }



        // Undo a chosen move or attack
        if (MarkerManagerScript.undoMarker)
        {
            if (Input.GetKeyDown(KeyCode.U))
            {
                // Determine what the player's first attack is
                if (firstAttack != 0)
                {
                    // Determine what the player's second attack is
                    if (secondAttack == 0)
                    {
                        // Reset attack
                        CharacterManagerScript.UndoMove();
                        firstAttack = 0;
                    }
                    else
                    {
                        // Reset attack
                        CharacterManagerScript.UndoMove();
                        secondAttack = 0;
                    }
                }
            }
        }
    }
Пример #8
0
    public IEnumerator RunSimulation(int playerFirstAttack, int playerSecondAttack, string enemyFirstAttack, string enemySecondAttack, GameObject runner)
    {
        CombatManagerScript.netrixiAttacks = false;
        CombatManagerScript.folkvarAttacks = false;
        CombatManagerScript.ivAttacks      = false;


        // FIRST ATTACK
        yield return(new WaitForSecondsRealtime(moveDelay));

        // Check to see if any Main Characters move for their first attack
        CheckForPlayerMovement(playerFirstAttack, 1);
        // If any Main Characters did move for their first attack
        if (didPlayerMove1)
        {
            yield return(new WaitForSecondsRealtime(moveDelay));
        }

        // Check to see if any Enemy Characters move for their first attack
        CheckForEnemyMovement(enemyFirstAttack, 1);
        // If any Enemy Characters did move for their first attack
        if (didEnemyMove1)
        {
            yield return(new WaitForSecondsRealtime(moveDelay));
        }



        // Check to see what the player's first attack is
        if (!didPlayerMove1)
        {
            AttackScript.PlayerAttack(playerFirstAttack, 1);
            CombatManagerScript.playerAttacking1 = true;

            AttackScript.enemyAttack = !AttackScript.enemyAttack;

            // Wait for attack animation to play
            yield return(new WaitForSecondsRealtime(attack1Delay));
        }

        // Check to see what the enemy's first attack is
        if (!didEnemyMove1)
        {
            AttackScript.EnemyAttack(enemyFirstAttack, 1, enemyAttacker1);
            CombatManagerScript.enemyAttacking1 = true;

            AttackScript.playerAttack = !AttackScript.playerAttack;

            // Wait for attack animation to play
            yield return(new WaitForSecondsRealtime(attack1Delay));
        }



        // SECOND ATTACK

        // Check to see if any Main Characters move for their second attack
        CheckForPlayerMovement(playerSecondAttack, 2);
        // If any Main Characters did move for their second attack
        if (didPlayerMove2)
        {
            yield return(new WaitForSecondsRealtime(moveDelay));
        }

        // Check to see if any Enemy Characters move for their second attack
        CheckForEnemyMovement(enemySecondAttack, 2);
        // If any Enemy Characters did move for their second attack
        if (didEnemyMove2)
        {
            yield return(new WaitForSecondsRealtime(moveDelay));
        }



        // Check to see what the player's second attack is
        if (!didPlayerMove2)
        {
            AttackScript.PlayerAttack(playerSecondAttack, 2);
            CombatManagerScript.playerAttacking2 = true;

            AttackScript.enemyAttack = !AttackScript.enemyAttack;

            // Wait for attack animation to play
            yield return(new WaitForSecondsRealtime(attack2Delay));
        }

        // Check to see what the enemy's second attack is
        if (!didEnemyMove2)
        {
            AttackScript.EnemyAttack(enemySecondAttack, 2, enemyAttacker2);
            CombatManagerScript.enemyAttacking2 = true;

            AttackScript.playerAttack = !AttackScript.playerAttack;

            // Wait for attack animation to play
            yield return(new WaitForSecondsRealtime(attack2Delay));
        }



        // Reset variables once simulation is finished
        CombatManagerScript.firstAttack  = 0;
        CombatManagerScript.secondAttack = 0;

        NetrixiCombatScript.ResetNetrixiVariables();
        FolkvarCombatScript.ResetFolkvarVariables();
        IvCombatScript.ResetIvVariables();

        CombatManagerScript.roundNumber += 1;

        CombatManagerScript.playerAttacking1 = false;
        CombatManagerScript.playerAttacking2 = false;
        CombatManagerScript.enemyAttacking1  = false;
        CombatManagerScript.enemyAttacking2  = false;

        CombatManagerScript.target1Location = 0;
        CombatManagerScript.target2Location = 0;

        CharacterManagerScript.ResetVariables();
        EnemyManagerScript.ClearMoves();

        didPlayerMove1 = false;
        didPlayerMove2 = false;
        didEnemyMove1  = false;
        didEnemyMove2  = false;


        // If only one character is alive
        //if (CombatManagerScript.netrixiAlive && !CombatManagerScript.folkvarAlive && !CombatManagerScript.ivAlive) CombatManagerScript.netrixiAttacks = true;
        //if (!CombatManagerScript.netrixiAlive && CombatManagerScript.folkvarAlive && !CombatManagerScript.ivAlive) CombatManagerScript.folkvarAttacks = true;
        //if (!CombatManagerScript.netrixiAlive && !CombatManagerScript.folkvarAlive && CombatManagerScript.ivAlive) CombatManagerScript.ivAttacks = true;


        Destroy(runner);
    }
    public static void FolkvarAttack()
    {
        if (CombatManagerScript.folkvarAttacks)
        {
            // First attack
            // If player first puts their hand in the top-left corner
            if (MarkerManagerScript.currentLocation == 1)
            {
                folkvarCondition1[0] = true;
            }

            if (folkvarCondition1[0] && !folkvarCondition1[1])
            {
                Debug.Log("Sword at the ready");

                // If player then moves hand to the bottom-right
                if (Input.GetKeyDown(KeyCode.C))
                {
                    folkvarCondition1[1] = true;
                }

                // If player instead places their hand in any other corner
                if (!folkvarCondition1[1])
                {
                    if (Input.GetKeyDown(KeyCode.W) || Input.GetKeyDown(KeyCode.E) || Input.GetKeyDown(KeyCode.A) || Input.GetKeyDown(KeyCode.S) || Input.GetKeyDown(KeyCode.D) || Input.GetKeyDown(KeyCode.Z) || Input.GetKeyDown(KeyCode.X))
                    {
                        folkvarCondition1[0] = false;
                    }
                }
            }


            // Second attack
            // If player moves their hand closer to the webcam first
            if (MarkerManagerScript.currentLocation == 2)
            {
                folkvarCondition2[0] = true;
            }

            if (folkvarCondition2[0])
            {
                // If player then moves hand to the upper-left section
                if (Input.GetKeyDown(KeyCode.E))
                {
                    folkvarCondition2[1] = true;
                }


                // If player then moves hand downwards
                if (folkvarCondition2[1])
                {
                    print("Sword ready to strike from the heavens");

                    // If player then moves hand to the bottom-middle section
                    if (Input.GetKeyDown(KeyCode.C))
                    {
                        folkvarCondition2[2] = true;
                    }

                    // If player instead moves hand to a different location
                    if (Input.GetKeyDown(KeyCode.Q) || Input.GetKeyDown(KeyCode.A) || Input.GetKeyDown(KeyCode.Z) || Input.GetKeyDown(KeyCode.S) || Input.GetKeyDown(KeyCode.X) || Input.GetKeyDown(KeyCode.D))
                    {
                        folkvarCondition2[1] = false;
                        folkvarCondition2[0] = false;
                    }
                }
                else
                {
                    // If player instead moves hand to a different location
                    if (Input.GetKeyDown(KeyCode.Q) || Input.GetKeyDown(KeyCode.A) || Input.GetKeyDown(KeyCode.Z) || Input.GetKeyDown(KeyCode.S) || Input.GetKeyDown(KeyCode.X) || Input.GetKeyDown(KeyCode.D))
                    {
                        folkvarCondition2[0] = false;
                    }
                }
            }


            // Third attack
            // If player starts by placing their hand in the bottom-left corner
            if (MarkerManagerScript.currentLocation == 7)
            {
                folkvarCondition3[0] = true;
            }

            if (folkvarCondition3[0] && !folkvarCondition3[1])
            {
                Debug.Log("Point 1");

                // If player then places their their hand in the top-middle corner
                if (Input.GetKeyDown(KeyCode.W))
                {
                    folkvarCondition3[1] = true;
                }

                print(folkvarCondition1[1]);

                // If player instead places their hand in any other corner
                if (!folkvarCondition3[1])
                {
                    if (Input.GetKeyDown(KeyCode.Q) || Input.GetKeyDown(KeyCode.E) || Input.GetKeyDown(KeyCode.A) || Input.GetKeyDown(KeyCode.S) || Input.GetKeyDown(KeyCode.D) || Input.GetKeyDown(KeyCode.X))
                    {
                        folkvarCondition3[0] = false;
                    }
                }
            }

            // If player has then placed hand in the top-middle corner
            if (folkvarCondition3[1] && !folkvarCondition3[2])
            {
                Debug.Log("Point 2");

                // If player then places their their hand in the bottom-right corner
                if (Input.GetKeyDown(KeyCode.C))
                {
                    Debug.Log("Point 3");

                    // The player has successfully made the pattern
                    folkvarCondition3[2] = true;
                }

                // If player instead places their hand in any other corner
                if (!folkvarCondition3[2])
                {
                    if (Input.GetKeyDown(KeyCode.Q) || Input.GetKeyDown(KeyCode.E) || Input.GetKeyDown(KeyCode.A) || Input.GetKeyDown(KeyCode.S) || Input.GetKeyDown(KeyCode.D) || Input.GetKeyDown(KeyCode.X))
                    {
                        folkvarCondition3[0] = false;
                        folkvarCondition3[1] = false;
                    }
                }
            }



            // Check to see if the player decided to move for their turn instead
            if (MarkerManagerScript.goMarker)
            {
                if (Input.GetKeyDown(KeyCode.V))
                {
                    folkvarCondition4[0] = true;
                }
            }

            if (folkvarCondition4[0])
            {
                // If the player decides to move Folkvar to the left
                if (Input.GetKeyDown(KeyCode.Q) || Input.GetKeyDown(KeyCode.A) || Input.GetKeyDown(KeyCode.Z))
                {
                    if (CharacterManagerScript.MoveFolkvar(1) == 1)
                    {
                        folkvarCondition4[1] = true;
                    }

                    // If they cannot move in that direction
                    if (CharacterManagerScript.MoveFolkvar(1) == 2)
                    {
                        print("Choose another direction to move in");
                        folkvarCondition4[0] = false;
                    }
                }

                // If the player decides to move Folkvar to the right
                if (Input.GetKeyDown(KeyCode.E) || Input.GetKeyDown(KeyCode.D) || Input.GetKeyDown(KeyCode.C))
                {
                    if (CharacterManagerScript.MoveFolkvar(2) == 1)
                    {
                        folkvarCondition4[2] = true;
                    }

                    // If they cannot move in that direction
                    if (CharacterManagerScript.MoveFolkvar(2) == 2)
                    {
                        print("Choose another direction to move in");
                        folkvarCondition4[0] = false;
                    }
                }
            }
            else
            {
                folkvarCondition4[1] = false;
                folkvarCondition4[2] = false;
            }



            // check to see if Folkvar has made any attacks
            CombatManagerScript.FolkvarMeleeAttack();


            // Reset variables if an attack is canceled
            if (MarkerManagerScript.undoMarker)
            {
                if (Input.GetKeyDown(KeyCode.U))
                {
                    ResetFolkvarVariables();
                }
            }
        }
    }