示例#1
0
 public bool LargePosion(HeroStore hero)
 {
     Run();
     if (hero.hp > 0)
     {
         hero.hp = hero.hp + 100;
         if (_core._gameMode == _GameStatus.BATTLE)
         {
             foreach (Hero h in _battleCon._heroData)
             {
                 if (h.hero.id == hero.id)
                 {
                     h._icon.transform.Find("HPSlider").GetComponent <ControlSlider>().AddFill((float)hero.hp * 1 / hero.hpMax);
                     break;
                 }
             }
         }
         _core.CreateEffect(_core._healEffect, hero.obj.transform);
         return(true);
     }
     else
     {
         _core.OpenErrorNotify("ใช้กับฮีโร่ที่ตายไม่ได้!");
         return(false);
     }
 }
示例#2
0
 public bool Revive(HeroStore hero)
 {
     Run();
     if (hero.hp == 0)
     {
         hero.hp = 1;
         if (_core._gameMode == _GameStatus.BATTLE)
         {
             int index = 0;
             foreach (Hero h in _battleCon._heroData)
             {
                 if (h.hero.id == hero.id)
                 {
                     h._icon.transform.Find("HPSlider").GetComponent <ControlSlider>().AddFill((float)hero.hp * 1 / hero.hpMax);
                     h.Revive();
                     _battleCon._hero.Add(h);
                     _battleCon._hero = _battleCon._hero.OrderBy(o => o.slotId).ToList();
                     break;
                 }
                 index++;
             }
         }
         foreach (Hero r in _battleCon._hero)
         {
             Debug.Log(r.hero.hero.name + " " + r.slotId);
         }
         _core.OpenTrueNotify("ชุบชีวิตฮีโร่สำเร็จ!");
         _selectATKCon.UpdateAttackSlot();
         return(true);
     }
     else
     {
         _core.OpenErrorNotify("ใช้กับฮีโร่นี้ไม่ได้!");
         return(false);
     }
 }
示例#3
0
 public bool Antidote(HeroStore hero)
 {
     Run();
     //Debug.Log("Re actionPoint ");
     return(true);
 }
示例#4
0
 public bool ReCrystal(HeroStore hero)
 {
     Run();
     //Debug.Log("Re actionPoint ");
     return(true);
 }
示例#5
0
 public int CalculateMDEF(HeroStore hero)
 {
     return((int)(hero.STR / 10 + hero.AGI / 5 + hero.INT * 0.5));
 }
示例#6
0
 public int CalculateDEF(HeroStore hero)
 {
     return((int)(hero.STR / 5 + hero.AGI * 0.5 + hero.INT / 5));
 }
示例#7
0
 public int CalculateMATK(HeroStore hero)
 {
     return((int)(hero.STR / 10 + hero.AGI / 5 + hero.INT * 1.5 + _damageBase / 2));
 }
示例#8
0
 public int CalculateATK(HeroStore hero)
 {
     return((int)(hero.STR * 1.5 + hero.AGI / 5 + hero.INT / 10 + _damageBase));
 }