方眼用紙でダメージのグラフを書いてみたら?

float k,m;//係数

int ダメージ計算(int 攻撃力, int 防御力, float 弱点属性倍率) {
int n = (攻撃力-(1.0-弱点属性倍率)*防御力*m)*k;
if (n<0)n=0;
return n
}