Exemplo n.º 1
0
    private void DeterminePlayerVitals()
    {
        GameInformation.PlayerClass = new BaseWarriorClass();
        GameInformation.Intellect   = GameInformation.PlayerClass.Intellect;
        GameInformation.Strength    = GameInformation.PlayerClass.Strength;
        GameInformation.Stamina     = GameInformation.PlayerClass.Stamina;
        GameInformation.Endurance   = GameInformation.PlayerClass.Endurance;

        GameInformation.PlayerHealth = StatCalculation.CalculateHealth(GameInformation.Stamina);
        GameInformation.PlayerEnergy = StatCalculation.CalculateEnergy(GameInformation.Endurance);
        GameInformation.PlayerLevel  = 2;

        /*
         * playerStamina = StatCalculation.CalculateStat (GameInformation.Stamina,
         *      StatCalculations.StatType.stamina,GameInformation.PlayerLevel,false);
         * playerEndurance = StatCalculation.CalculateStat (GameInformation.Endurance,
         *      StatCalculations.StatType.endurance,GameInformation.PlayerLevel,false);
         */
        /*
         * enemyStamina = StatCalculation.CalculateStat (GameInformation.Stamina,
         *      StatCalculations.StatType.stamina,GameInformation.PlayerLevel,false);
         * enemyEndurance = StatCalculation.CalculateStat (GameInformation.Endurance,
         *      StatCalculations.StatType.endurance,GameInformation.PlayerLevel,false);
         * enemyHealth = StatCalculation.CalculateHealth(newEnemy.Stamina);
         * enemyEnergy = StatCalculation.CalculateEnergy (enemyEndurance);
         */



        GameInformation.EnemyName   = enemyNames[0];
        GameInformation.EnemyHealth = StatCalculation.CalculateHealth(GameInformation.Stamina / 2);
        GameInformation.EnemyEnergy = StatCalculation.CalculateEnergy(GameInformation.Endurance / 2);
        GameInformation.EnemyLevel  = Random.Range((int)GameInformation.PlayerLevel - 1, (int)GameInformation.PlayerLevel + 1);
    }
    public void CreateNewEnemy()
    {
        newEnemy.PlayerName  = enemyNames[Random.Range(0, enemyNames.Length - 1)];
        newEnemy.PlayerLevel = GameInformation.PlayerLevel;
        newEnemy.PlayerClass = classTypes [Random.Range(0, classTypes.Length - 1)];
        newEnemy.Rhetoric    = statCalculations.CalculateStat(newEnemy.PlayerClass.Rhetoric, StatCalculations.StatType.RHETORIC, newEnemy.PlayerLevel, true);
        newEnemy.Image       = statCalculations.CalculateStat(newEnemy.PlayerClass.Image, StatCalculations.StatType.IMAGE, newEnemy.PlayerLevel, true);
        newEnemy.Diplomacy   = statCalculations.CalculateStat(newEnemy.PlayerClass.Diplomacy, StatCalculations.StatType.DIPLOMACY, newEnemy.PlayerLevel, true);

        enemyMaxHealth     = statCalculations.CalculateHealth(newEnemy.Diplomacy);
        enemyMaxEnergy     = statCalculations.CalculateEnergy(newEnemy.Rhetoric);
        enemyCurrentHealth = enemyMaxHealth;
        enemyCurrentEnergy = enemyMaxEnergy;
    }
Exemplo n.º 3
0
 private void DeterminePlayerVitals()
 {
     playerHealth = statCalculations.CalculateHealth(GameInfoManager.Constitution);
     playerEnergy = statCalculations.CalculateEnergy(GameInfoManager.Strength);
     GameInfoManager.PlayerCurrentHealth = playerHealth;
     GameInfoManager.PlayerCurrentEnergy = playerEnergy;
 }
Exemplo n.º 4
0
    void Initialized()
    {
        BaseWarriorClass warrior = new BaseWarriorClass(); // Need to make a method that gets the stats from warrior,

        baseCharacter.classess       = BaseCharacterClass.CharacterClasses.WARRIOR;
        GameInformation.PlayerClass  = baseCharacter;
        GameInformation.PlayerName   = "Anaku";// Will change later once we get the actual names of the heros in the story.
        GameInformation.PlayerLevel  = 0;
        GameInformation.Agility      = warrior.Agility;
        GameInformation.Strength     = warrior.Strength;
        GameInformation.Intellect    = warrior.Intellect;
        GameInformation.Mastery      = warrior.Mastery;
        GameInformation.Stamina      = warrior.Stamina;
        GameInformation.Resistance   = 100;
        GameInformation.Endurance    = warrior.Endurance;
        GameInformation.PlayerHealth = calculations.CalculateHealth(GameInformation.Endurance);
        GameInformation.PlayerEnergy = calculations.CalculateEnergy(GameInformation.Intellect);
        GameInformation.CurrentXp    = 0;
        GameInformation.CritChance   = 5 + (GameInformation.Agility * 0.2f);         // Affected by agility and items
        GameInformation.CritDamage   = 2 * ((GameInformation.Agility * 0.1f) / 100); // Affect by agility and some items
        GameInformation.Zodiac       = new BaseTigerClass();                         // The zodiac side and zodiac you are
        GameInformation.SummonsUp    = 0;
        basePlayer.SetStats(false);
        basePlayer.StatPointsToAllocate = 0;
        basePlayer.PlayerClass          = GameInformation.PlayerClass;
        // This will be how we calculate the p layers main stat.
        LevelUp levelUp = new LevelUp();

        for (int i = 0; i < level; i++)
        {
            levelUp.LevelUpCharacter();
        }
        Debug.Log(GameInformation.RequiredXP);
    }
Exemplo n.º 5
0
 private void DeterminePlayerVitatls()
 {
     GameInformation.PlayerName  = "Test Name";
     GameInformation.PlayerClass = new BaseMageClass(); // Change it instantly makes it a mage class, maybe switch cases/ if else?
     GameInformation.Intellect   = GameInformation.PlayerClass.Intellect;
     GameInformation.Stamina     = GameInformation.PlayerClass.Stamina;
     GameInformation.Endurance   = GameInformation.PlayerClass.Endurance;
     playerStamina               = statCalculations.CalulateStat(GameInformation.Stamina, StatCalculations.StatType.STAMINA, GameInformation.PlayerLevel, false);
     playerEndurance             = statCalculations.CalulateStat(GameInformation.Endurance, StatCalculations.StatType.ENDURANCE, GameInformation.PlayerLevel, false);
     playerHealth                = statCalculations.CalculateHealth(playerEndurance);
     playerEnergy                = statCalculations.CalculateEnergy(playerStamina);
     GameInformation.PlayerLevel = 1;
     Debug.Log(GameInformation.PlayerHealth);
     GameInformation.PlayerHealth = playerHealth;
     GameInformation.PlayerEnergy = playerEnergy;
 }
Exemplo n.º 6
0
    private void DeterminePlayerVitals()
    {
        GameInformation.PlayerName  = "Test Name";
        GameInformation.PlayerClass = new BaseMageClass();
        GameInformation.Intellect   = GameInformation.PlayerClass.Intellect;

        GameInformation.Endurance = GameInformation.PlayerClass.Endurance;
        GameInformation.Stamina   = GameInformation.PlayerClass.Stamina;
        playerStamina             = statCalculationsScript.CalculateStat(GameInformation.Stamina, StatCalculations.StatType.STAMINA, GameInformation.PlayerLevel, false);
        playerEndurance           = statCalculationsScript.CalculateStat(GameInformation.Endurance, StatCalculations.StatType.ENDURANCE, GameInformation.PlayerLevel, false);
        playerHealth = statCalculationsScript.CalculateHealth(playerStamina);
        playerEnergy = statCalculationsScript.CalculateEnergy(playerEndurance);
        GameInformation.PlayerHealth = playerHealth;
        Debug.Log("Player Health= " + GameInformation.PlayerHealth);
        GameInformation.PlayerEnergy = playerEnergy;
        GameInformation.PlayerLevel  = 1;
    }
Exemplo n.º 7
0
    /// <summary>
    /// 1 is mage, 2 is warrior, 3 is Enhancer, 4 is paladin, 5 is Priest, and 6 is archer
    /// </summary>
    /// <param name="enemyClassNum"></param>
    ///
    void CalculateEnemyInfo(int enemyClassNum)
    {
        enemyInfo    = gameObject.GetComponent <EnemyInformation>();
        newEnemy     = new BasePlayer();
        calculations = new StatCalculations();
        name         = gameObject.name;
        int number = enemyClassNum;

        if (number == 1)
        {
            enemyInfo.PlayerClass = new BaseMageClass();
            enemyInfo.MainStat    = enemyInfo.Intellect;
        }
        else if (number == 2)
        {
            enemyInfo.PlayerClass = new BaseWarriorClass();
            enemyInfo.MainStat    = enemyInfo.Strength;
        }
        else if (number == 3)
        {
            enemyInfo.PlayerClass = new BaseEnhancerClass();
            enemyInfo.MainStat    = enemyInfo.Agility;
        }
        else if (number == 4)
        {
            enemyInfo.PlayerClass = new BasePaladinClass();
            enemyInfo.MainStat    = enemyInfo.Endurance;
        }
        else if (number == 5)
        {
            enemyInfo.PlayerClass = new BasePriestClass();
            enemyInfo.MainStat    = enemyInfo.Mastery;
        }
        else if (number == 6)
        {
            enemyInfo.PlayerClass = new BaseArcherClass();
            enemyInfo.MainStat    = enemyInfo.Agility;
        }
        //MAKE SURE TO CREATE A NEW INSTANCE OF THIS FOR EVERY ENEMY/BOSS ETC.
        // HAve to add it to all the enemies in and playtest it
        // We are going to learn about networking soon.
        enemyInfo.PlayerLevel = 20; // <- Dynamically from enemy scripts
        stamina    = enemyInfo.PlayerClass.Stamina * (enemyInfo.PlayerLevel / 2);
        intellect  = enemyInfo.PlayerClass.Intellect * (enemyInfo.PlayerLevel / 2);
        strength   = enemyInfo.PlayerClass.Strength * (enemyInfo.PlayerLevel / 2);
        endurance  = enemyInfo.PlayerClass.Endurance * (enemyInfo.PlayerLevel / 2);
        agility    = enemyInfo.PlayerClass.Agility * (enemyInfo.PlayerLevel / 2);
        mastery    = enemyInfo.PlayerClass.Mastery * (enemyInfo.PlayerLevel / 2);
        resistance = enemyInfo.PlayerClass.Resistance;
        SetEnemyInfo();
        if (number == 1)
        {
            enemyInfo.MainStat = enemyInfo.Intellect;
        }
        else if (number == 2)
        {
            enemyInfo.MainStat = enemyInfo.Strength;
        }
        else if (number == 3)
        {
            enemyInfo.MainStat = enemyInfo.Agility;
        }
        else if (number == 4)
        {
            enemyInfo.MainStat = enemyInfo.Endurance;
        }
        else if (number == 5)
        {
            enemyInfo.MainStat = enemyInfo.Mastery;
        }
        else if (number == 6)
        {
            enemyInfo.MainStat = enemyInfo.Agility;
        }

        enemyInfo.PlayerMaxHealth = calculations.CalculateHealth(enemyInfo.Endurance);
        enemyInfo.PlayerMaxEnergy = calculations.CalculateEnergy(enemyInfo.Intellect);
        enemyInfo.PlayerHealth    = enemyInfo.PlayerMaxHealth;
        enemyInfo.PlayerEnergy    = enemyInfo.PlayerMaxEnergy;

        calculated = true;
        Debug.Log(calculated);
    }