コード例 #1
0
    private void CreateNewEnemy()
    {
        newEnemy.PlayerName = enemyNames[0];

        newEnemy.PlayerLevel = Random.Range(GameInfoManager.PlayerLevel - 2,
                                            GameInfoManager.PlayerLevel + 2);
        newEnemy.PlayerClass = new FighterClass();

        newEnemy.Strength = statCalculations.CalculateStat(newEnemy.Strength,
                                                           StatCalculations.StatTypes.STRENGTH, newEnemy.PlayerLevel);

        newEnemy.Strength = statCalculations.CalculateStat(newEnemy.Dexterity,
                                                           StatCalculations.StatTypes.DEXTERITY, newEnemy.PlayerLevel);

        newEnemy.Strength = statCalculations.CalculateStat(newEnemy.Intellegence,
                                                           StatCalculations.StatTypes.INTELLIGENCE, newEnemy.PlayerLevel);

        newEnemy.Strength = statCalculations.CalculateStat(newEnemy.Wisdom,
                                                           StatCalculations.StatTypes.WISDOM, newEnemy.PlayerLevel);

        newEnemy.Strength = statCalculations.CalculateStat(newEnemy.Charisma,
                                                           StatCalculations.StatTypes.CHARISMA, newEnemy.PlayerLevel);

        newEnemy.CurrentHitPoints = 100;
        Debug.Log(newEnemy.CurrentHitPoints);
        Debug.Break();

        //newEnemy.MaxHitPoints = 100;

        newEnemy.CurrentEnergy =
            newEnemy.MaxEnergy = 50;
    }
コード例 #2
0
 private void CreateNewEnemy()
 {
     newEnemy.PlayerName  = enemyNames[Random.Range(0, enemyNames.Length + 1)];
     newEnemy.PlayerLevel = Random.Range(GameInformation.PlayerLevel - 2, GameInformation.PlayerLevel + 2);
     newEnemy.PlayerClass = classTypes[Random.Range(0, classTypes.Length + 1)]; // Randomly choose a class out of the array above
     newEnemy.Stamina     = statCalculations.CalculateStat(newEnemy.Stamina, StatCalculations.StatType.STAMINA, newEnemy.PlayerLevel);
     newEnemy.Endurance   = statCalculations.CalculateStat(newEnemy.Endurance, StatCalculations.StatType.STAMINA, newEnemy.PlayerLevel);
     newEnemy.Intellect   = statCalculations.CalculateStat(newEnemy.Intellect, StatCalculations.StatType.STAMINA, newEnemy.PlayerLevel);
     newEnemy.Strength    = statCalculations.CalculateStat(newEnemy.Strength, StatCalculations.StatType.STAMINA, newEnemy.PlayerLevel);
 }
コード例 #3
0
 public void CreateNewEnemy()
 {
     newEnemy.PlayerName  = enemyNames[Random.Range(0, enemyNames.Length)];
     newEnemy.PlayerLevel = Random.Range(GameInformation.PlayerLevel - 2, GameInformation.PlayerLevel + 2);
     newEnemy.Stamina     = StatCalculation.CalculateStat(newEnemy.Stamina,
                                                          StatCalculations.StatType.stamina, newEnemy.PlayerLevel, true);
     newEnemy.Intellect = StatCalculation.CalculateStat(newEnemy.Intellect,
                                                        StatCalculations.StatType.intellect, newEnemy.PlayerLevel, true);
     newEnemy.Strength = StatCalculation.CalculateStat(newEnemy.Strength,
                                                       StatCalculations.StatType.strength, newEnemy.PlayerLevel, true);
     newEnemy.Endurance = StatCalculation.CalculateStat(newEnemy.Endurance,
                                                        StatCalculations.StatType.endurance, newEnemy.PlayerLevel, true);
 }
コード例 #4
0
    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;
    }
コード例 #5
0
    private void CreateNewEnemy()
    {
        // pull base values from dictionary created via xml
        newEnemy.PlayerName = enemyNames[Random.Range(0, enemyNames.Length)]; // chosen from dictionary with set stats that are slightly modified
        int highestLevel = (GameInformation.PlayerCPU / 5) * 5 + 5;           // enemyTeir * 5;
        int lowestLevel  = highestLevel - 5;

        newEnemy.CPULevel    = Random.Range(lowestLevel, highestLevel + 1); // replace playerlevel with enemy teir
        newEnemy.PlayerClass = new BaseWardenClass();                       // replace with enemy class via randomly selected enemy
        newEnemy.ICE         = statCalculations.CalculateStat(10, StatCalculations.StatType.ICE, newEnemy.CPULevel);
        newEnemy.RAM         = statCalculations.CalculateStat(100, StatCalculations.StatType.RAM, newEnemy.CPULevel);
        newEnemy.Strength    = statCalculations.CalculateStat(3, StatCalculations.StatType.STRENGTH, newEnemy.CPULevel);
        newEnemy.Dexterity   = statCalculations.CalculateStat(3, StatCalculations.StatType.DEXTERITY, newEnemy.CPULevel);
        newEnemy.Intellect   = statCalculations.CalculateStat(3, StatCalculations.StatType.INTELLECT, newEnemy.CPULevel);
        TurnBasedCombatStateMachine.Enemy = newEnemy;
    }
コード例 #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;
    }
コード例 #7
0
 private void SetupNewStats()
 {
     maxHP           = statCalculationsScript.CalculateHP(baseHP, level, hpIV, hpEV);
     curMaxHP        = maxHP;
     maxPP           = statCalculationsScript.CalculatePP(basePP, level);
     curMaxPP        = maxPP;
     maxATK          = statCalculationsScript.CalculateStat(baseATK, level, atkIV, atkEV, nature, StatCalculations.StatTypes.ATTACK);
     maxDEF          = statCalculationsScript.CalculateStat(baseDEF, level, defIV, defEV, nature, StatCalculations.StatTypes.DEFENSE);
     maxSPATK        = statCalculationsScript.CalculateStat(baseSPATK, level, spatkIV, spatkEV, nature, StatCalculations.StatTypes.SPECIALATTACK);
     maxSPDEF        = statCalculationsScript.CalculateStat(baseSPDEF, level, spdefIV, spdefEV, nature, StatCalculations.StatTypes.SPECIALDEFENSE);
     maxSPD          = statCalculationsScript.CalculateStat(baseSPD, level, spdIV, spdEV, nature, StatCalculations.StatTypes.SPEED);
     curHP           = curMaxHP;
     curPP           = curMaxPP;
     curATK          = maxATK;
     curDEF          = maxDEF;
     curSPATK        = maxSPATK;
     curSPDEF        = maxSPDEF;
     curSPD          = maxSPD;
     evasion         = 1.0f;
     accuracy        = 1.0f;
     lastRequiredEXP = calculateEXPScript.CalculateCurrentXP(level - 1, levelingRate);
     currentEXP      = calculateEXPScript.CalculateCurrentXP(level, levelingRate);
     nextRequiredEXP = calculateEXPScript.CalculateRequiredXP(level, levelingRate);
 }