Пример #1
0
    //마법 데미지
    public float SetMagicDamage(BattleChar user, float damCoef, int lv, float coef)
    {
        float totalDamage = .0f;

        if (DC.curHP <= 0)
        {
            return(0);
        }

        totalDamage  = (user.GetMgcATK() * damCoef * (1 + (lv * 0.005f))) - (user.GetMgcATK() * damCoef * (GetMgcDEF() / (50 + (100 - BM.floorLevel) * 1.5f + GetMgcDEF())) * 1.4f) * coef;
        totalDamage *= buffMgcDAM;

        if (stateCount != null)
        {
            stateCount.addDamage(totalDamage);
        }

        print(this.transform.name + " is damaged " + totalDamage);
        if (SetHP(getHP() - totalDamage) > 0)
        {
            DamagedMgc(user);
        }

        return(totalDamage);
    }