コード例 #1
0
ファイル: IActor.cs プロジェクト: hihijack/wqz
    public int GetDamgerToOther(int damageOri, IActor other)
    {
        int damage = 0;
        int atk = damageOri;
        int armOther = other.GetArm();

        if(armOther >= 0){
            int damgeOffset = (int)( atk * (armOther * 0.06 / ( armOther * 0.06 + 1 )));
            damage = atk - damgeOffset;
        }else{
            int N = Mathf.Abs(armOther);
            float damgeAddPercent = 2 - Mathf.Pow(0.94f, N);
            damage = (int)(atk * damgeAddPercent);
        }
        return damage;
    }