Пример #1
0
    public void onElFireButton()
    {
        didAttack = false;
        if (WarriorScript.getCurrentMP() >= 8 && BattleTurn.currentTurn % 4 == 0 && didAttack == false && Enemy2Script.getCurrentHP() > 0)
        {
            didAttack = true;
            int enemyHPcurrent = EnemyScript.getCurrentHP();

            //prints are for debugging
            print(enemyHPcurrent);
            print(BattleTurn.playerMagicStat);
            print(EnemyScript.getMagicStat());

            EnemyScript.setHP(enemyHPcurrent - BattleTurn.playerMagicStat + EnemyScript.getMagicStat() - 15);

            enemyHPcurrent = EnemyScript.getCurrentHP();
            print(enemyHPcurrent);

            WarriorScript.setMP(WarriorScript.getCurrentMP() - 8);

            BattleTurn.currentTurn++;

            //enemySelectText.gameObject.SetActive(false);
        }    //end if
        else if (BattleTurn.currentTurn % 4 == 0 && didAttack == false)
        {
            errorSound.Play();
            print("Elfire button warrior");
        }        //end else if

        if (MageScript.getCurrentMP() >= 8 && BattleTurn.currentTurn % 4 == 1 && didAttack == false && EnemyScript.getCurrentHP() > 0)
        {
            didAttack = true;
            int enemyHPcurrent = EnemyScript.getCurrentHP();

            //prints are for debugging
            print(enemyHPcurrent);
            print(BattleTurn.playerMagicStat);
            print(EnemyScript.getMagicStat());

            EnemyScript.setHP(enemyHPcurrent - BattleTurn.playerMagicStat + EnemyScript.getMagicStat() - 15);

            enemyHPcurrent = EnemyScript.getCurrentHP();
            print(enemyHPcurrent);

            MageScript.setMP(MageScript.getCurrentMP() - 8);

            BattleTurn.currentTurn++;

            //enemySelectText.gameObject.SetActive(false);
        }    //end if
        else if (BattleTurn.currentTurn % 4 == 1 && didAttack == false)
        {
            errorSound.Play();
            print("Elfire button mage");
        }        //end else if
    }//end onElFireButton
Пример #2
0
    }//end onFireButton

    public void onFireButton2()
    {
        didAttack = false;
        if (WarriorScript.getCurrentMP() >= 4 && BattleTurn.currentTurn % 4 == 0 && didAttack == false && Enemy2Script.getCurrentHP() > 0)
        {
            didAttack = true;
            int enemy2HPcurrent = Enemy2Script.getCurrentHP();

            //prints are for debugging
            print(enemy2HPcurrent);
            print(BattleTurn.playerMagicStat);
            print(Enemy2Script.getMagicStat());

            Enemy2Script.setHP(enemy2HPcurrent - BattleTurn.playerMagicStat + Enemy2Script.getMagicStat() - 10);

            enemy2HPcurrent = Enemy2Script.getCurrentHP();
            print(enemy2HPcurrent);

            WarriorScript.setMP(WarriorScript.getCurrentMP() - 4);

            BattleTurn.currentTurn++;
        }   //end if
        else if (BattleTurn.currentTurn % 4 == 0 && didAttack == false)
        {
            errorSound.Play();
            print("Fire button 2 warrior");
        }        //end else if

        if (MageScript.getCurrentMP() >= 4 && BattleTurn.currentTurn % 4 == 1 && didAttack == false && Enemy2Script.getCurrentHP() > 0)
        {
            didAttack = true;
            int enemy2HPcurrent = Enemy2Script.getCurrentHP();

            //prints are for debugging
            print(enemy2HPcurrent);
            print(BattleTurn.playerMagicStat);
            print(Enemy2Script.getMagicStat());

            Enemy2Script.setHP(enemy2HPcurrent - BattleTurn.playerMagicStat + Enemy2Script.getMagicStat() - 10);

            enemy2HPcurrent = Enemy2Script.getCurrentHP();
            print(enemy2HPcurrent);

            MageScript.setMP(MageScript.getCurrentMP() - 4);

            BattleTurn.currentTurn++;
        }    //end if
        else if (BattleTurn.currentTurn % 4 == 1 && didAttack == false)
        {
            errorSound.Play();
            print("Fire button 2 mage");
        }        //end else if
    }//end onFireButton2
Пример #3
0
    }     //end onElixerWarrior

    public void onElixirMage()
    {
        if (MageScript.getCurrentMP() + 10 >= MageScript.getMaxMP())
        {
            MageScript.setHP(MageScript.getMaxMP());
        }        //end if
        else
        {
            MageScript.setMP(MageScript.getCurrentMP() + 10);
        }        //end else

        BattleTurn.currentTurn++;
    }    //end onElixerMage
Пример #4
0
    public void onMoreHealWarrior()
    {
        if (BattleTurn.playerCurrentMP >= 12)
        {
            if (BattleTurn.currentTurn % 4 == 0)
            {
                WarriorScript.setHP(WarriorScript.getCurrentHP() + BattleTurn.playerMagicStat + 20);
                WarriorScript.setMP(WarriorScript.getCurrentMP() - 12);
            }            //end if

            if (BattleTurn.currentTurn % 4 == 1)
            {
                WarriorScript.setHP(WarriorScript.getCurrentHP() + BattleTurn.playerMagicStat + 20);
                MageScript.setMP(MageScript.getCurrentMP() - 12);
            }

            BattleTurn.currentTurn++;
        }
        else if (BattleTurn.playerCurrentMP < 12)
        {
            errorSound.Play();
        } //end else if
    }     //end onMoreHealWarrior
Пример #5
0
    }     //end onHealWarrior

    public void onHealMage()
    {
        if (BattleTurn.playerCurrentMP >= 6)
        {
            if (BattleTurn.currentTurn % 4 == 0)
            {
                MageScript.setHP(MageScript.getCurrentHP() + BattleTurn.playerMagicStat + 10);
                WarriorScript.setMP(WarriorScript.getCurrentMP() - 6);
            }            //end if

            if (BattleTurn.currentTurn % 4 == 1)
            {
                MageScript.setHP(MageScript.getCurrentHP() + BattleTurn.playerMagicStat + 10);
                MageScript.setMP(MageScript.getCurrentMP() - 6);
            }

            BattleTurn.currentTurn++;
        }
        else if (BattleTurn.playerCurrentMP < 6)
        {
            errorSound.Play();
        } //end else if
    }     //end onHealMage