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); } }
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); } }
public bool Antidote(HeroStore hero) { Run(); //Debug.Log("Re actionPoint "); return(true); }
public bool ReCrystal(HeroStore hero) { Run(); //Debug.Log("Re actionPoint "); return(true); }
public int CalculateMDEF(HeroStore hero) { return((int)(hero.STR / 10 + hero.AGI / 5 + hero.INT * 0.5)); }
public int CalculateDEF(HeroStore hero) { return((int)(hero.STR / 5 + hero.AGI * 0.5 + hero.INT / 5)); }
public int CalculateMATK(HeroStore hero) { return((int)(hero.STR / 10 + hero.AGI / 5 + hero.INT * 1.5 + _damageBase / 2)); }
public int CalculateATK(HeroStore hero) { return((int)(hero.STR * 1.5 + hero.AGI / 5 + hero.INT / 10 + _damageBase)); }