Пример #1
0
 public void setStatColor(Pokemon pokemon)
 {
     for (int i = 1; i < statTextsTotal.Count; i++)
     {
         if (NatureEffect.GetNatureModifier(pokemon.Nature, dictionary[i]) == 1.1f)
         {
             statTextsTotal[i].color = highStatColor;
         }
         else if (NatureEffect.GetNatureModifier(pokemon.Nature, dictionary[i]) == 0.9f)
         {
             statTextsTotal[i].color = lowStatColor;
         }
         else
         {
             statTextsTotal[i].color = Color.black;
         }
     }
 }
Пример #2
0
 public void RefreshStats()
 {
     Stats[Stat.Attack]    = Mathf.FloorToInt(((((Base.Attack * 2 + IV[Stat.Attack] + (EV[Stat.Attack] / 4)) * Level) / 100f) + 5) * NatureEffect.GetNatureModifier(Nature, Stat.Attack));
     Stats[Stat.Defense]   = Mathf.FloorToInt(((((Base.Defense * 2 + IV[Stat.Defense] + (EV[Stat.Defense] / 4)) * Level) / 100) + 5) * NatureEffect.GetNatureModifier(Nature, Stat.Defense));
     Stats[Stat.SpAttack]  = Mathf.FloorToInt(((((Base.SpAttack * 2 + IV[Stat.SpAttack] + (EV[Stat.SpAttack] / 4)) * Level) / 100) + 5) * NatureEffect.GetNatureModifier(Nature, Stat.SpAttack));
     Stats[Stat.SpDefense] = Mathf.FloorToInt(((((Base.SpDefense * 2 + IV[Stat.SpDefense] + (EV[Stat.SpDefense] / 4)) * Level) / 100) + 5) * NatureEffect.GetNatureModifier(Nature, Stat.SpDefense));
     Stats[Stat.Speed]     = Mathf.FloorToInt(((((Base.Speed * 2 + IV[Stat.Speed] + (EV[Stat.Speed] / 4)) * Level) / 100) + 5) * NatureEffect.GetNatureModifier(Nature, Stat.Speed));
     Stats[Stat.Hp]        = Mathf.FloorToInt(((Base.Hp * 2 + IV[Stat.Hp] + (EV[Stat.Hp] / 4)) * Level) / 100) + Level + 10;
 }
Пример #3
0
    public void CalculateStats()
    {
        Stats = new Dictionary <Stat, int>();
        Stats.Add(Stat.Attack, Mathf.FloorToInt(((((Base.Attack * 2 + IV[Stat.Attack] + (EV[Stat.Attack] / 4)) * Level) / 100f) + 5) * NatureEffect.GetNatureModifier(Nature, Stat.Attack)));
        Stats.Add(Stat.Defense, Mathf.FloorToInt(((((Base.Defense * 2 + IV[Stat.Defense] + (EV[Stat.Defense] / 4)) * Level) / 100) + 5) * NatureEffect.GetNatureModifier(Nature, Stat.Defense)));
        Stats.Add(Stat.SpAttack, Mathf.FloorToInt(((((Base.SpAttack * 2 + IV[Stat.SpAttack] + (EV[Stat.SpAttack] / 4)) * Level) / 100) + 5) * NatureEffect.GetNatureModifier(Nature, Stat.SpAttack)));
        Stats.Add(Stat.SpDefense, Mathf.FloorToInt(((((Base.SpDefense * 2 + IV[Stat.SpDefense] + (EV[Stat.SpDefense] / 4)) * Level) / 100) + 5) * NatureEffect.GetNatureModifier(Nature, Stat.SpDefense)));
        Stats.Add(Stat.Speed, Mathf.FloorToInt(((((Base.Speed * 2 + IV[Stat.Speed] + (EV[Stat.Speed] / 4)) * Level) / 100) + 5) * NatureEffect.GetNatureModifier(Nature, Stat.Speed)));
        Stats.Add(Stat.Accurarcy, 1);

        MaxHP = Mathf.FloorToInt(((Base.Hp * 2 + IV[Stat.Hp] + (EV[Stat.Hp] / 4)) * Level) / 100) + Level + 10;
        Stats.Add(Stat.Hp, Mathf.FloorToInt(((Base.Hp * 2 + IV[Stat.Hp] + (EV[Stat.Hp] / 4)) * Level) / 100) + Level + 10);
    }