internal void PlayerLost() //Player lost. Now we tell them how they did, and if they got any high scores.
    {
        playerAbilities abilities = player.GetComponent <playerAbilities>();

        Score += (Modifier * abilities.ReturnExpBoost());


        Welcome.text = "Your run of " + quizRunning.Operator + " Arena is over...";
        int highScore = highScores.checkLevel(running.Operator, levels, Score, list.playerName);
        int highLevel = highScores.checkScore(running.Operator, Score, levels, list.playerName);

        save();

        if (highScore == 0 && highLevel == 0)
        {
            lostText.text = "You reached the Highest Level AND score! WOW!";
        }
        else if (highScore == 0)
        {
            lostText.text = "You got the highest Score. Grats!";
        }
        else if (highLevel == 0)
        {
            lostText.text = "You got the furthest in. Grats!";
        }
        else if (highScore >= 0 || highLevel >= 0)
        {
            lostText.text = "You're on the leaderboard!";
        }
        else
        {
            lostText.text = "Keep trying. You'll do better next time!";
        }
    }
Esempio n. 2
0
    internal void SetAttacks(bool boss, bool startWithAttack)
    {
        if (!playerAbilities)
        {
            playerAbilities = FindObjectOfType <playerAbilities>();
        }

        bool doubleAttck = playerAbilities.DoubleStrike();

        if (doubleAttck && !boss)
        {
            attacksPherPhase = 2;
        }
        else
        {
            attacksPherPhase = 1;
        }
        if (startWithAttack || !boss)
        {
            attacks = attacksPherPhase;
        }
        else
        {
            attacks = 0;
        }
    }
Esempio n. 3
0
    //Set Health+time to full.
    public void ResetPlayer(bool a_boss)
    {
        bossFighting = a_boss;

        if (!list)
        {
            list = FindObjectOfType <equipmentList>();
        }

        if (avatar != null)
        {
            Destroy(avatar);
        }

        avatar = list.BuildCharacter(container);


        if (!abilities)
        {
            abilities = GetComponent <playerAbilities>();
            abilities.Begin();
            Debug.Log("abilities begun");
        }

        abilities.SetupAbilities(a_boss);
        if (!a_boss)
        {
            EndTurn(false);
        }

        Frozen = 0;
        if (!calculator)
        {
            calculator = FindObjectOfType <Calculator>();
        }

        calculator.AddInput("Cancel");

        maxHealth = baseHealth * abilities.EquipmentHealth();

        attackDamage = baseAttack * abilities.EquipmentAttack();

        currentHealth = maxHealth;
        Healthbar.setMaxHealth(maxHealth, true);

        resetTime = parent.quizRunning.levelTime + abilities.EquipmentTime();

        counterTimeModifier = abilities.CounterTimeModify();
        counterDamage       = baseAttack * abilities.EquipmentCounter();

        FindObjectOfType <TorsoPart>().Animate(Animations.Idle);

        parent.currentEnemy.loadMonster();
    }
    //Begins setting up button.

    //buttontype is the avility this button will be responsible for.
    //Charges if how many uses it has.
    //a_abilities is a reference to the ability manager.
    internal void SetUpButton(abilityTypes buttonType, int charges, playerAbilities a_abilities)
    {
        abilities = a_abilities;

        thisButton  = buttonType;
        chargesLeft = charges;

        SetButtonActive();

        GetComponent <Image>().sprite = abilities.Icons[((int)thisButton - 1)];

        if (buttonType == abilityTypes.Dodge || buttonType == abilityTypes.Freeze)
        {
            SetChargingButton(charges);
        }
        else
        {
            turnsSinceCharged = 0;
            chargeTimeNeeded  = 0;
        }
    }