public int GiveHeal(GhostMoveBase move) { var heal = (move.getBaseDmg() * MaxHp) / 100; HP += (int)heal; if (HP >= MaxHp) { HP = MaxHp; } return((int)heal); }
public void MinusCost(GhostMoveBase moveBase) { costType type = moveBase.getCostType(); var cost = moveBase.getCost(); if (type == costType.Hp) { cost = Mathf.Round((moveBase.getCost() + 1 * PlayerStat.maxHealth / 100)); PlayerStat.health -= (int)cost; } else { cost = Mathf.Round((moveBase.getCost() + 1 * PlayerStat.maxMana / 50)); PlayerStat.mana -= (int)cost; } }
public int GiveDmg(GhostMoveBase move) { var mod = Random.Range(0.75f, 1.1f); var dmg = 0f; if (move.GetMoveType() == moveType.Physical) { dmg = (((((2 * Level / 5) + 2) * move.getBaseDmg() * Atk / PlayerStat.def) / 50) + 2) * mod; } else { dmg = (((((2 * Level / 5) + 2) * move.getBaseDmg() * SAtk / PlayerStat.sdef) / 50) + 2) * mod; } PlayerStat.health -= Mathf.RoundToInt(dmg); return(Mathf.RoundToInt(dmg)); }
//-----------------------GhostMove---------------------------- public int TakeDmg(GhostMoveBase move) { var mod = Random.Range(0.75f, 1.1f); var dmg = 0f; if (move.GetMoveType() == moveType.Physical) { dmg = (((((2 * PlayerStat.lvl / 5) + 2) * move.getBaseDmg() * PlayerStat.atk / Def) / 50) + 2) * mod; } else { dmg = (((((2 * PlayerStat.lvl / 5) + 2) * move.getBaseDmg() * PlayerStat.satk / SDef) / 50) + 2) * mod; } HP -= Mathf.RoundToInt(dmg); if (HP <= 0) { HP = 0; } return(Mathf.RoundToInt(dmg)); }
public GhostMove(GhostMoveBase pBase) { Base = pBase; }