Exemplo n.º 1
0
 void labelStatsOther(Other_Stats stats, TextMeshProUGUI text)
 {
     if (stats.hp > 0)
     {
         text.text += "\n" + stats.hp;
     }
     if (stats.regen_cHP > 0)
     {
         text.text += "\n" + stats.regen_cHP + " %";
     }
     if (stats.restoration_HP > 0)
     {
         text.text += "\n" + stats.restoration_HP + " %";
     }
     if (stats.mp > 0)
     {
         text.text += "\n" + stats.mp;
     }
     if (stats.regen_cMP > 0)
     {
         text.text += "\n" + stats.regen_cMP + " %";
     }
     if (stats.restoration_MP > 0)
     {
         text.text += "\n" + stats.restoration_MP + " %";
     }
 }
Exemplo n.º 2
0
 bool boolStatsOther(Other_Stats stats)
 {
     if (stats.hp > 0)
     {
         return(true);
     }
     if (stats.regen_cHP > 0)
     {
         return(true);
     }
     if (stats.restoration_HP > 0)
     {
         return(true);
     }
     if (stats.mp > 0)
     {
         return(true);
     }
     if (stats.regen_cMP > 0)
     {
         return(true);
     }
     if (stats.restoration_MP > 0)
     {
         return(true);
     }
     return(false);
 }
Exemplo n.º 3
0
 void CalculateOther(Other_Stats stat)
 {
     currentStats.Other.regen_cHP      += stat.regen_cHP;
     currentStats.Other.regen_cMP      += stat.regen_cMP;
     currentStats.Other.restoration_HP += stat.restoration_HP;
     currentStats.Other.restoration_MP += stat.restoration_MP;
     currentStats.Other.hp             += stat.hp;
     currentStats.Other.mp             += stat.mp;
 }
Exemplo n.º 4
0
 public static void ViewOther(Other_Stats selected)
 {
     selected.hp             = EditorGUILayout.IntField("HP", selected.hp);
     selected.regen_cHP      = EditorGUILayout.IntField("HP camp regen", selected.regen_cHP);
     selected.restoration_HP = EditorGUILayout.IntField("HP item restoration", selected.restoration_HP);
     GUILayout.Space(10);
     selected.mp             = EditorGUILayout.IntField("MP", selected.mp);
     selected.regen_cMP      = EditorGUILayout.IntField("MP camp regen", selected.regen_cMP);
     selected.restoration_MP = EditorGUILayout.IntField("MP item restoration", selected.restoration_MP);
 }
Exemplo n.º 5
0
 public static CharacterStats CalculateOther(CharacterStats current, Other_Stats stat)
 {
     current.Other.regen_cHP      += stat.regen_cHP;
     current.Other.regen_cMP      += stat.regen_cMP;
     current.Other.restoration_HP += stat.restoration_HP;
     current.Other.restoration_MP += stat.restoration_MP;
     current.Other.hp             += stat.hp;
     current.Other.mp             += stat.mp;
     return(current);
 }
Exemplo n.º 6
0
 public Stats()
 {
     Base        = new Base_Stats();
     Battle      = new Battle_Stats();
     Ability     = new Ability_Stats();
     Equipment   = new Equipment_Stats();
     Resistance  = new Resistance_Stats();
     Other       = new Other_Stats();
     AtkState    = new List <State_Rate>();
     ResistState = new List <State_Rate>();
 }
Exemplo n.º 7
0
    public void UpdateStats()
    {
        Base        = new Base_Stats();
        Battle      = new Battle_Stats();
        Ability     = new Ability_Stats();
        Equipment   = new Equipment_Stats();
        Resistance  = new Resistance_Stats();
        Other       = new Other_Stats();
        AtkState    = new List <State_Rate>();
        ResistState = new List <State_Rate>();

        dmgWeapons[0] = new DmgWeapon();
        dmgWeapons[1] = new DmgWeapon();
    }
Exemplo n.º 8
0
 void ViewOtherPrecent(Other_Stats selected)
 {
     selected.hp = EditorGUILayout.IntField("HP %", selected.hp);
     GUILayout.Space(10);
     selected.mp = EditorGUILayout.IntField("MP %", selected.mp);
 }
Exemplo n.º 9
0
 public Precent_Stats()
 {
     Base   = new Base_Stats();
     Battle = new Battle_Stats();
     Other  = new Other_Stats();
 }
Exemplo n.º 10
0
 void PrecentOther(Other_Stats stat)
 {
     currentStats.Other.hp += (int)(currentStats.Other.hp * (float)stat.hp / 100f);
     currentStats.Other.mp += (int)(currentStats.Other.mp * (float)stat.mp / 100f);
 }
Exemplo n.º 11
0
 static CharacterStats PrecentOther(CharacterStats current, Other_Stats stat)
 {
     current.Other.hp += (int)(current.Other.hp * (float)stat.hp / 100f);
     current.Other.mp += (int)(current.Other.mp * (float)stat.mp / 100f);
     return(current);
 }